/**
 * Base styles — reset, global elements, typography, scrollbar
 */

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

html {
  height: 100%;
  background: var(--clr-bg);
  /* Prevent overscroll/bounce on iOS */
  overscroll-behavior: none;
}

body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--clr-text);
  background: var(--clr-bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent accidental text selection during swipes/taps */
  -webkit-user-select: none;
  user-select: none;
}

/* Re-allow selection in content areas and inputs */
.card-text,
input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

/* App shell */
.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
}

/* ── Ambient background glows ──────────────────────────────── */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}

.ambient__glow--1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(192, 16, 90, 0.13) 0%, transparent 70%);
  top: -160px;
  right: -160px;
  animation: glow-drift-1 9s ease-in-out infinite;
}

.ambient__glow--2 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(106, 27, 154, 0.11) 0%, transparent 70%);
  bottom: -120px;
  left: -120px;
  animation: glow-drift-2 11s ease-in-out infinite;
}

.ambient__glow--3 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(192, 16, 90, 0.07) 0%, transparent 70%);
  top: 38%;
  left: 18%;
  animation: glow-drift-3 13s ease-in-out infinite;
}

/* ── Focus styles ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ── Custom scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar         { width: 3px; }
::-webkit-scrollbar-track   { background: transparent; }
::-webkit-scrollbar-thumb   { background: var(--clr-border); border-radius: 2px; }
