.startup-splash {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: calc(28px + var(--safe-top)) 28px calc(28px + var(--safe-bottom));
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.28), transparent 25%),
    linear-gradient(145deg, #ff9b20 0%, #ff7618 44%, #f24a16 100%);
  color: #ffffff;
  opacity: 1;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.startup-splash.is-hiding {
  opacity: 0;
  visibility: hidden;
}

.startup-splash__brand {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.startup-splash__logo {
  width: clamp(116px, 26vw, 178px);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 28px 58px rgba(121, 45, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.startup-splash__brand strong {
  color: #ffffff;
  font-size: clamp(2.15rem, 8vw, 4.25rem);
  line-height: 0.95;
  font-weight: 800;
  text-shadow: 0 18px 36px rgba(122, 45, 0, 0.2);
}

.location-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
}

.location-overlay.is-open {
  pointer-events: auto;
}

.location-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 20, 16, 0.36);
  backdrop-filter: blur(8px);
}

.location-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  max-height: min(56vh, 470px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 14px 14px;
  background: rgba(255, 252, 248, 0.98);
  border: 1px solid rgba(80, 50, 25, 0.1);
  border-radius: 22px 22px 18px 18px;
  box-shadow: 0 -24px 52px rgba(62, 41, 22, 0.26);
  transform: translateY(22px);
  transition: transform 240ms ease;
}

.location-overlay.is-open .location-sheet {
  transform: translateY(0);
}

.location-sheet__handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 2px;
  border-radius: 999px;
  background: rgba(29, 26, 24, 0.18);
  flex: 0 0 auto;
}

.onboarding-main,
.location-focus-card,
.location-focus__content {
  display: contents;
}

.onboarding-brand,
.language-toggle--compact,
.location-benefit-list,
.manual-location-panel h2,
.manual-location-panel p {
  display: none;
}

.location-focus-card h1 {
  order: 1;
  color: var(--text-main);
  font-size: 1.18rem;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.location-focus__copy {
  order: 2;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
  text-align: center;
}

.location-action-group {
  order: 3;
  display: grid;
  gap: 9px;
  width: 100%;
}

.location-action-group .primary-button-lg {
  width: 100%;
  min-height: 48px;
}

.location-sheet__divider {
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-transform: lowercase;
}

.manual-location-panel {
  order: 4;
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 248, 241, 0.9);
  border: 1px solid rgba(20, 87, 54, 0.09);
}

.manual-location-fields {
  display: grid;
  gap: 10px;
}

.manual-location-field {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.manual-location-field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(20, 87, 54, 0.12);
  background: #ffffff;
  color: var(--text-main);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.permission-card {
  order: 5;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 248, 240, 0.92);
  border: 1px solid rgba(255, 185, 146, 0.24);
}

.permission-card[data-tone="loading"] {
  background: rgba(255, 242, 232, 0.96);
}

.permission-card[data-tone="error"] {
  background: rgba(255, 239, 236, 0.96);
}

.permission-pill {
  display: none;
}

.permission-card h2 {
  font-size: 0.92rem;
  line-height: 1.25;
  font-weight: 800;
}

.permission-card p {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-actions .primary-button,
.permission-actions .secondary-button,
.permission-actions .ghost-button {
  flex: 1 1 130px;
  min-height: 38px;
}

.location-selected-summary {
  order: 6;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(20, 87, 54, 0.08);
  box-shadow: 0 8px 18px rgba(31, 41, 36, 0.06);
}

.location-selected-summary span {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.location-selected-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-selected-summary .checkout-text-button {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
}

.onboarding-topbar {
  order: 7;
  display: flex;
  justify-content: center;
}

.onboarding-topbar__actions {
  display: flex;
  justify-content: center;
}

.location-close-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
}

.location-close-button svg {
  display: none;
}

.location-close-button::before {
  content: "x";
  color: var(--text-main);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.location-close-button::after {
  content: "Close";
}

.location-close-button:focus-visible,
.manual-location-field select:focus-visible {
  outline: 3px solid rgba(20, 87, 54, 0.2);
  outline-offset: 2px;
}

.is-location-sheet-open .app-content {
  overflow: hidden;
}

@media (max-width: 370px) {
  .location-overlay {
    padding: 10px;
    padding-bottom: calc(10px + var(--safe-bottom));
  }

  .location-sheet {
    max-height: min(62vh, 470px);
    padding: 9px 12px 12px;
    border-radius: 20px 20px 16px 16px;
  }

  .startup-splash__logo {
    border-radius: 30px;
  }
}

@media (min-width: 768px) {
  .location-overlay {
    padding-bottom: calc(28px + var(--safe-bottom));
  }

  .location-sheet {
    max-height: min(52vh, 470px);
    border-radius: 24px;
  }
}
