/* TaskCoastal mobile app shell: splash + installed-app polish */
:root {
  --tc-app-shell-bg: #061f28;
  --tc-app-shell-card: rgba(255, 255, 255, 0.09);
  --tc-app-shell-border: rgba(255, 255, 255, 0.16);
  --tc-app-shell-text: #effcff;
  --tc-app-shell-muted: rgba(239, 252, 255, 0.68);
}

.tc-native-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 22%, rgba(65, 105, 225, 0.22), transparent 38%),
    radial-gradient(circle at 18% 82%, rgba(35, 197, 94, 0.16), transparent 32%),
    linear-gradient(145deg, #092b37 0%, #061f28 52%, #031118 100%);
  color: var(--tc-app-shell-text);
  opacity: 1;
  visibility: visible;
  transition: opacity 420ms ease, visibility 420ms ease;
  overflow: hidden;
}

.tc-native-splash::before {
  content: "";
  position: absolute;
  width: min(70vw, 430px);
  height: min(70vw, 430px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  filter: blur(10px);
  transform: translateY(-8%);
}

.tc-native-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tc-native-splash-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 28px 30px;
  border: 1px solid var(--tc-app-shell-border);
  border-radius: 32px;
  background: var(--tc-app-shell-card);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: tcSplashRise 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tc-native-splash-logo {
  width: 92px;
  height: 92px;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
  animation: tcSplashPulse 1400ms ease-in-out infinite;
}

.tc-native-splash-title {
  font: 900 28px/1.05 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.05em;
}

.tc-native-splash-subtitle {
  font: 700 13px/1.2 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tc-app-shell-muted);
}

.tc-native-splash-loader {
  width: 128px;
  height: 5px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
}

.tc-native-splash-loader span {
  display: block;
  width: 48%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(111, 143, 255, 0.3), rgba(111, 143, 255, 1), rgba(35, 197, 94, 0.95));
  animation: tcSplashLoad 1180ms ease-in-out infinite;
}

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

@keyframes tcSplashPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.025); }
}

@keyframes tcSplashLoad {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(230%); }
}

@media (prefers-reduced-motion: reduce) {
  .tc-native-splash,
  .tc-native-splash-card,
  .tc-native-splash-logo,
  .tc-native-splash-loader span {
    animation: none !important;
    transition: none !important;
  }
}
