:root {
  --nav-h: 60px;

  --bg-app: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;

  --primary: #3b82f6;
  --primary-hover: #2563eb;

  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  position: relative;
  overflow: hidden;

  /* IMPORTANT: navbar-safe content area */
  padding-top: var(--nav-h);
}

.hidden {
  display: none !important;
}

/* --- Screen transitions --- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.2s ease-in-out;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

/* Base UI helpers */
.row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.row.end {
  justify-content: flex-end;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.small-muted {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.35;
  margin-top: 10px;
  white-space: pre-wrap;
}

.note {
  max-width: 800px;
  margin: 18px auto 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}