:root {
  color-scheme: light;
  --brand-cyan: #08badc;
  --brand-cyan-dark: #079abc;
  --ink: #102a56;
  --muted: #5f6f86;
  --surface: #f5f8fb;
}

* {
  box-sizing: border-box;
}

html,
body,
.app-shell {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.app-shell {
  position: fixed;
  inset: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: #fff;
}

.ops-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  background: #fff;
}

.ops-frame.is-loaded {
  opacity: 1;
}

.launch-screen,
.setup-screen {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(8, 186, 220, 0.18), transparent 34%),
    #f7fbfd;
}

.launch-screen[hidden],
.setup-screen[hidden] {
  display: none;
}

.launch-logo,
.setup-logo {
  width: 132px;
  height: 132px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 14px 36px rgba(16, 42, 86, 0.18);
}

h1 {
  margin: 0 0 6px;
  font-size: 1.55rem;
  letter-spacing: 0;
}

p {
  max-width: 440px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.45;
}

code,
pre {
  font-family: Consolas, "SFMono-Regular", monospace;
}

pre {
  max-width: min(560px, 92vw);
  overflow: auto;
  margin: 12px auto 0;
  padding: 12px;
  border: 1px solid rgba(16, 42, 86, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.offline-banner {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: #102a56;
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 8px 20px rgba(16, 42, 86, 0.18);
}

.offline-banner[hidden] {
  display: none;
}

.is-slow .launch-logo {
  animation: pulse 1.7s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.985); opacity: 0.82; }
}
