/* === THEME & VARIABLES === */
:root {
  --background-color: #f5f5f5;
  --surface-color: #fff; /* Used for header/footer */
  --text-primary: #1a1a1a;
  --text-secondary: #666;
  --accent-color: #0066cc;   /* Blue for active states */
  --border-color: #e0e0e0;
  --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* === CSS RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background-color: var(--background-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  /* Eliminate 300ms tap delay */
  touch-action: manipulation;
}

/* Prevent Safari iOS auto-zoom on input focus (requires >= 16px) */
input, select, textarea {
  font-size: max(16px, 1rem);
}

/* Outermost container */
.container {
  display: grid;
  grid-template-areas:
    "header"
    "main"
    "footer"; /* Named areas for clarity */
  grid-template-columns: minmax(0, 1fr); /* Single column for mobile */
  grid-template-rows: auto 1fr 65px; /* Header auto, main flexible, footer fixed height to reserve space */
  min-height: 100vh; /* Full viewport height */
  max-width: 800px; /* Maximum width */
  margin: 0 auto; /* Center horizontally */
}

/* Grid area assignments for sections */
main {
  grid-area: main;
  padding: 1rem;
  width: 100%;
}

/* === PWA INSTALL BUTTON === */
.pwa-install-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem auto;
  padding: 0.875rem 1.5rem;
  min-height: 2.75rem;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
}

.pwa-install-btn:hover {
  background: #004999;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pwa-install-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
