:root {
  color-scheme: dark light;
  --bg: #07120e;
  --panel: rgba(12, 29, 22, .96);
  --line: rgba(150, 205, 181, .22);
  --text: #f5fbf8;
  --muted: #abc2b8;
  --accent: #57a879;
  --accent2: #3e845f;
  --warn: #f0c86a;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
#appFrame {
  position: fixed; inset: 0; width: 100%; height: 100%; border: 0;
  background: var(--bg); display: block;
}
#splash {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(80, 160, 118, .18), transparent 36%),
    linear-gradient(160deg, #0c2118, #05100c 72%);
  color: var(--text); transition: opacity .28s ease, visibility .28s ease;
}
#splash.done { opacity: 0; visibility: hidden; pointer-events: none; }
.card {
  width: min(92vw, 520px); border: 1px solid var(--line); border-radius: 24px;
  padding: 28px; text-align: center; background: var(--panel);
  box-shadow: 0 24px 80px rgba(0,0,0,.36);
}
.logo { width: 78px; height: 78px; border-radius: 22px; margin: 0 auto 16px; display: block; }
h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
p { color: var(--muted); line-height: 1.55; margin: 10px 0 0; }
.loader { width: 42px; height: 42px; border-radius: 999px; margin: 24px auto 0;
  border: 4px solid rgba(255,255,255,.12); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#fallback { display: none; margin-top: 22px; }
#fallback.show { display: block; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
button, a.btn {
  appearance: none; border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 800;
  font-size: 14px; cursor: pointer; text-decoration: none; color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
button.secondary, a.btn.secondary { background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.small { font-size: 12px; color: var(--muted); margin-top: 12px; }
#offline {
  position: fixed; left: 50%; bottom: 16px; z-index: 40; transform: translateX(-50%) translateY(20px);
  opacity: 0; pointer-events: none; color: #201600; background: var(--warn); border-radius: 999px;
  padding: 9px 14px; font-weight: 800; font-size: 13px; transition: .2s ease;
}
#offline.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 560px) { .card { border-radius: 20px; padding: 24px 18px; } h1 { font-size: 25px; } }
