*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:             #0b0c10;
  --surface:        #0d0e14;
  --border:         #161b22;
  --border2:        #21262d;
  --border3:        #30363d;
  --text:           #e6edf3;
  --text2:          #8b949e;
  --text3:          #6e7681;
  --text4:          #484f58;
  --accent:         #58a6ff;
  --green:          #238636;
  --green2:         #2ea043;
  --yellow:         #f7df1e;
  --danger:         #f85149;
  --danger-bg:      #200d0d;
  --danger-border:  #5c2020;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
}

::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border3); border-radius: 2px; }

/* ── Loading overlay (shown during cache restore on refresh) ── */
#loading {
  display: none;
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 999;
  align-items: center; justify-content: center; flex-direction: column;
  gap: 20px;
}
html.restoring #loading  { display: flex; }
html.restoring #landing  { display: none; }

.loading-logo           { font-size: 26px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.loading-logo span      { color: var(--yellow); }
.loading-spinner        {
  width: 28px; height: 28px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.loading-text           { font-size: 11px; color: var(--text4); }
@keyframes spin         { to { transform: rotate(360deg); } }

/* ── App shell ── */
#app         { display: none; height: 100vh; flex-direction: column; }
#app.visible { display: flex; }
#body        { flex: 1; display: flex; min-height: 0; }
