html { background: #030704; overscroll-behavior-y: none; }
html, body { min-height: 100%; }
body {
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  overscroll-behavior-y: none;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}
button, a, input, select, textarea { touch-action: manipulation; }
input, textarea, select { font-size: max(16px, 1em); }

#pwa-boot-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  color: #f5fff8;
  background:
    radial-gradient(circle at 50% 36%, rgba(140,255,176,.18), transparent 30%),
    linear-gradient(145deg, #020403, #07130b 55%, #020403);
  overflow: hidden;
  transition: opacity .68s cubic-bezier(.22,1,.36,1), transform .68s cubic-bezier(.22,1,.36,1), filter .68s ease;
}
#pwa-boot-splash::before,
#pwa-boot-splash::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
#pwa-boot-splash::before {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(140,255,176,.18), transparent 68%);
  animation: golfos-orbit 2.2s ease-in-out infinite alternate;
}
#pwa-boot-splash::after {
  width: 220px;
  height: 220px;
  border: 1px solid rgba(140,255,176,.12);
  box-shadow: 0 0 80px rgba(140,255,176,.08), inset 0 0 60px rgba(223,255,113,.04);
  animation: golfos-ring 2.4s ease-in-out infinite;
}
#pwa-boot-splash > * { position: relative; z-index: 1; }

#pwa-boot-splash.is-ready img { transform: scale(1.045); filter: brightness(1.08); }
#pwa-boot-splash.is-leaving { opacity: 0; transform: scale(1.045); filter: blur(8px); pointer-events: none; }
#pwa-boot-splash img { width: 104px; height: 104px; border-radius: 30px; box-shadow: 0 22px 70px rgba(0,0,0,.55), 0 0 50px rgba(140,255,176,.12); animation: golfos-logo-arrive .9s cubic-bezier(.22,1,.36,1) both, golfos-logo-float 2.2s ease-in-out .9s infinite; transition: transform .35s ease, filter .35s ease; }
#pwa-boot-splash strong { margin-top: 13px; font-size: 28px; letter-spacing: -.04em; animation: golfos-copy-arrive .7s ease .25s both; }
#pwa-boot-splash span { color: rgba(245,255,248,.62); font-size: 13px; font-weight: 700; animation: golfos-copy-arrive .7s ease .42s both; }
.pwa-boot-pulse { width: 76px; height: 5px; margin-top: 22px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.10); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); animation: golfos-copy-arrive .6s ease .58s both; }
.pwa-boot-pulse::after { content: ''; display: block; width: 45%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#8cffb0,#dfff71); animation: golfos-pwa-pulse 1.05s ease-in-out infinite alternate; }
@keyframes golfos-pwa-pulse { from { transform: translateX(-30%); } to { transform: translateX(190%); } }
@keyframes golfos-logo-arrive { from { opacity: 0; transform: translateY(18px) scale(.78) rotate(-3deg); filter: blur(8px); } to { opacity: 1; transform: translateY(0) scale(1) rotate(0); filter: blur(0); } }
@keyframes golfos-logo-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes golfos-copy-arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes golfos-orbit { from { transform: scale(.92); opacity: .55; } to { transform: scale(1.08); opacity: 1; } }
@keyframes golfos-ring { 0% { transform: scale(.86); opacity: .2; } 50% { opacity: .65; } 100% { transform: scale(1.18); opacity: .08; } }

.golfos-pwa-toast {
  position: fixed;
  z-index: 100000;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: min(560px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 22px;
  color: #f5fff8;
  background: rgba(8,20,12,.94);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
  backdrop-filter: blur(24px);
  opacity: 0;
  transform: translate(-50%, 18px);
  transition: opacity .24s ease, transform .24s ease;
}
.golfos-pwa-toast.is-visible { opacity: 1; transform: translate(-50%,0); }
.golfos-pwa-toast-dot { width: 11px; height: 11px; border-radius: 99px; background: #8cffb0; box-shadow: 0 0 18px rgba(140,255,176,.85); }
.golfos-pwa-toast.tone-warning .golfos-pwa-toast-dot { background: #ffd166; box-shadow: 0 0 18px rgba(255,209,102,.8); }
.golfos-pwa-toast-copy { min-width: 0; }
.golfos-pwa-toast-copy strong, .golfos-pwa-toast-copy span { display: block; }
.golfos-pwa-toast-copy strong { font-size: 14px; }
.golfos-pwa-toast-copy span { margin-top: 2px; color: rgba(245,255,248,.65); font-size: 12px; line-height: 1.35; }
.golfos-pwa-toast button { min-height: 38px; padding: 8px 12px; border: 0; border-radius: 999px; background: linear-gradient(135deg,#8cffb0,#dfff71); color: #03180a; font-weight: 900; cursor: pointer; }
.golfos-pwa-toast .golfos-pwa-toast-close { min-width: 34px; padding: 0; background: rgba(255,255,255,.08); color: #f5fff8; font-size: 21px; }

@media (display-mode: standalone) {
  body { user-select: none; }
  input, textarea { user-select: text; }
}
@media (max-width: 600px) {
  .golfos-pwa-toast { grid-template-columns: auto minmax(0,1fr) auto; }
  .golfos-pwa-toast > button:not(.golfos-pwa-toast-close) { grid-column: 2 / -1; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
