/* ==============================================================================
   GRASSQUEST DESIGN SYSTEM
   Modern Outdoor-Tech Aesthetic
   "AI that gives you a mission, then gets out of your way."
   ============================================================================== */

:root {
  --bg-deep: #070a08;
  --bg-surface: #0d130f;
  --bg-card: rgba(16, 26, 19, 0.75);
  --bg-card-hover: rgba(24, 38, 28, 0.85);
  --bg-card-active: rgba(34, 197, 94, 0.12);
  
  --border-subtle: rgba(74, 222, 128, 0.12);
  --border-focus: rgba(74, 222, 128, 0.45);
  --border-glow: #22c55e;
  
  --color-green-500: #22c55e;
  --color-green-400: #4ade80;
  --color-green-600: #16a34a;
  --color-emerald: #10b981;
  --color-gold: #fbbf24;
  --color-amber: #f59e0b;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(34, 197, 94, 0.35);
  
  --transition-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==============================================================================
   RESET & BASE
   ============================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, #121f15 0%, var(--bg-deep) 75%);
}

/* Accessible focus outline */
:focus-visible {
  outline: 2px solid var(--color-green-400);
  outline-offset: 3px;
}

/* Background Ambient Lighting */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.glow-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.3) 0%, transparent 70%);
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
}

.glow-2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
  bottom: 50px;
  right: -50px;
}

/* App Shell Layout */
.app-shell {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem 2.5rem;
}

/* Header */
.app-header {
  padding: 0.75rem 0 1.5rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.6));
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, var(--color-green-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.badge-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  color: var(--text-primary);
}

/* ==============================================================================
   FLOW STEPS & VIEW SWITCHING
   ============================================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.flow-step {
  display: none;
  animation: fadeInStep var(--transition-smooth);
}

.flow-step.active-step {
  display: block;
}

@keyframes fadeInStep {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glassmorphism Card Base */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
}

/* ==============================================================================
   STEP 1: LANDING SCREEN
   ============================================================================== */
.landing-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.75rem 2.25rem;
}

.brand-badge-row {
  margin-bottom: 1.5rem;
}

.pill-badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.12);
  color: var(--color-green-400);
  border: 1px solid rgba(34, 197, 94, 0.25);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.hero-icon-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.hero-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.18);
  animation: pulseAura 3s infinite ease-in-out;
}

.hero-emoji {
  font-size: 3.5rem;
  z-index: 1;
  filter: drop-shadow(0 0 15px rgba(34, 197, 94, 0.6));
}

@keyframes pulseAura {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.25);
    opacity: 0.7;
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-green-400);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.hero-description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 440px;
  margin-bottom: 2rem;
}

.cta-action-group {
  width: 100%;
  max-width: 360px;
  margin-bottom: 2.5rem;
}

.three-step-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.preview-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.preview-num {
  width: 24px;
  height: 24px;
  background: rgba(34, 197, 94, 0.2);
  color: var(--color-green-400);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.preview-content {
  display: flex;
  flex-direction: column;
}

.preview-content strong {
  font-size: 0.8rem;
  color: var(--text-primary);
}

.preview-content span {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.preview-arrow {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.credibility-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.25rem;
  width: 100%;
}

.credibility-line {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cred-pill {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==============================================================================
   BUTTONS
   ============================================================================== */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  font-size: 0.95rem;
}

.btn-large {
  padding: 1.05rem 2rem;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius-lg);
  font-weight: 700;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-green-500) 0%, var(--color-green-600) 100%);
  color: #041007;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(34, 197, 94, 0.5);
  background: linear-gradient(135deg, var(--color-green-400) 0%, var(--color-green-500) 100%);
}

.btn-primary:active {
  transform: translateY(0);
}

.glow-effect {
  position: relative;
  overflow: hidden;
}

.glow-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 45%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 55%
  );
  transform: rotate(30deg);
  pointer-events: none;
  animation: shineSweep 4s infinite ease-in-out;
}

@keyframes shineSweep {
  0% { transform: translateX(-100%) rotate(30deg); }
  25%, 100% { transform: translateX(100%) rotate(30deg); }
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.btn-text-nav {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.3rem 0;
  transition: color var(--transition-fast);
}

.btn-text-nav:hover {
  color: var(--color-green-400);
}

/* ==============================================================================
   STEP 2: QUEST SETUP FORM
   ============================================================================== */
.setup-container {
  padding: 2.25rem 2rem;
}

.setup-header {
  margin-bottom: 2rem;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
}

.step-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.setup-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.form-section {
  border: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-transform: uppercase;
}

/* Option Grids (Radio cards) */
.options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.option-card {
  position: relative;
  cursor: pointer;
  display: block;
}

.option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card .card-content {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.option-card:hover .card-content {
  background: var(--bg-card-hover);
  border-color: rgba(74, 222, 128, 0.3);
}

.option-card input[type="radio"]:checked + .card-content {
  background: var(--bg-card-active);
  border-color: var(--color-green-400);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.2);
}

.opt-emoji {
  font-size: 1.45rem;
}

.opt-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Duration Pills */
.pills-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.pill-card {
  position: relative;
  cursor: pointer;
}

.pill-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-label {
  display: block;
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.65rem 0.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.pill-card:hover .pill-label {
  border-color: rgba(74, 222, 128, 0.3);
}

.pill-card input[type="radio"]:checked + .pill-label {
  background: var(--color-green-500);
  color: #041208;
  border-color: var(--color-green-400);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

/* Location input */
.input-with-hint {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.text-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.text-input:focus {
  border-color: var(--color-green-400);
  outline: none;
}

.text-input::placeholder {
  color: var(--text-dim);
}

.input-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* GPS Notice Box */
.gps-notice-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.gps-icon {
  font-size: 1.4rem;
}

.gps-text {
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  line-height: 1.35;
}

.gps-text strong {
  color: var(--color-green-400);
}

.gps-text span {
  color: var(--text-muted);
}

/* ==============================================================================
   STEP 3: LOADING SCREEN
   ============================================================================== */
.loading-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4.5rem 2rem;
}

.loading-orb {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.orb-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px dashed rgba(74, 222, 128, 0.3);
}

.ring-1 {
  animation: spinSlow 8s linear infinite;
  border-color: rgba(34, 197, 94, 0.6) transparent;
}

.ring-2 {
  width: 80%;
  height: 80%;
  animation: spinRev 6s linear infinite;
  border-color: transparent rgba(16, 185, 129, 0.5);
}

.orb-center {
  font-size: 2.8rem;
  filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.8));
  animation: bobbing 2s infinite ease-in-out;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinRev {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes bobbing {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.08); }
}

.loading-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.loading-subtext {
  font-size: 1rem;
  color: var(--color-green-400);
  min-height: 1.5rem;
  margin-bottom: 2rem;
  font-weight: 500;
}

.loading-details {
  display: flex;
  gap: 0.5rem;
}

.tech-pill {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

/* ==============================================================================
   STEP 4: QUEST RESULT CARD
   ============================================================================== */
.result-container {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 2.25rem 2rem;
}

.quest-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nature-pill {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-green-400);
  letter-spacing: 0.08em;
  background: rgba(34, 197, 94, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.meta-tag-right {
  display: flex;
  gap: 0.5rem;
}

.badge-duration, .badge-distance {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.quest-headline-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 1.25rem;
}

.quest-card-title {
  font-family: var(--font-display);
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
  line-height: 1.2;
}

.quest-summary {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.quest-block {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
}

.block-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-green-400);
  margin-bottom: 0.5rem;
}

.objective-block .block-content {
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.step-marker {
  color: var(--color-green-400);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
}

.bonus-block {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.05);
}

.bonus-block .block-label {
  color: var(--color-gold);
}

.bonus-content {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.safety-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Voice Preview Card */
.voice-preview-card {
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.voice-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.voice-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-green-400);
  letter-spacing: 0.05em;
}

.voice-status-indicator {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.btn-audio-preview {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--color-green-400);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-audio-preview:hover {
  background: rgba(34, 197, 94, 0.25);
}

.voice-script-quote {
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.result-actions-cluster {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.btn-start-dominant {
  width: 100%;
  font-size: 1.15rem;
  padding: 1.15rem;
}

.secondary-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ==============================================================================
   STEP 5: REAL OUTDOOR ACTIVE QUEST SCREEN (SCREEN-MINIMIZING)
   ============================================================================== */
.active-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
  padding: 2.25rem 1.75rem;
}

.active-status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-green-400);
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  background: var(--color-green-400);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-green-400);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}

.audio-state-tag {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* GIANT ANTI-SCREEN BANNER */
.anti-screen-banner {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 2px solid var(--color-green-400);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.25);
  animation: glowBanner 4s infinite alternate;
}

@keyframes glowBanner {
  0% { box-shadow: 0 0 15px rgba(34, 197, 94, 0.2); }
  100% { box-shadow: 0 0 35px rgba(34, 197, 94, 0.4); }
}

.pocket-phone-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.pocket-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.pocket-subtitle {
  font-size: 0.95rem;
  color: var(--color-green-400);
  font-style: italic;
}

/* Timer Display */
.timer-display-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.timer-countdown {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.timer-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Telemetry Card */
.telemetry-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.telemetry-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.telemetry-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-caption {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.telemetry-divider {
  font-size: 1.6rem;
  color: var(--text-dim);
}

/* Progress Track */
.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-emerald) 0%, var(--color-green-400) 100%);
  border-radius: var(--radius-full);
  transition: width 400ms ease;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.progress-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.gps-accuracy-label {
  color: var(--color-green-400);
}

/* Active Mission Brief */
.active-mission-card {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.active-mission-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.active-mission-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Active actions */
.active-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 0.65rem;
}

/* ==============================================================================
   STEP 6: QUEST COMPLETE SCREEN
   ============================================================================== */
.complete-container {
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 3rem 1.75rem 2.25rem;
}

.confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.complete-trophy-badge {
  font-size: 3.5rem;
  filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.8));
  animation: bounceCelebration 1.2s ease;
}

@keyframes bounceCelebration {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.2); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

.celebration-pill {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-green-400);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}

.complete-heading {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 40%, var(--color-green-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.complete-subtext {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 420px;
}

.stats-summary-card {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.stats-quest-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-big-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-green-400);
}

.stat-box-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.complete-actions-cluster {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ==============================================================================
   HISTORY DRAWER & OVERLAY
   ============================================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.history-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 90%;
  max-width: 400px;
  background: #0b110d;
  border-left: 1px solid var(--border-subtle);
  z-index: 100;
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.history-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.4rem;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.history-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.history-item-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.history-item-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.empty-history {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 200px;
  color: var(--text-dim);
  gap: 0.75rem;
}

.empty-icon {
  font-size: 2.5rem;
}

.drawer-footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.5rem 0.8rem;
}

/* ==============================================================================
   TOAST NOTIFICATION
   ============================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  width: 90%;
  max-width: 440px;
}

.toast {
  background: #111a13;
  border: 1px solid var(--border-focus);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  font-size: 0.88rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastIn 250ms ease;
  pointer-events: auto;
}

.toast-success {
  border-color: var(--color-green-400);
}

.toast-warning {
  border-color: var(--color-gold);
}

.toast-error {
  border-color: #ef4444;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==============================================================================
   FOOTER
   ============================================================================== */
.app-footer {
  margin-top: 2.5rem;
  text-align: center;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.footer-copy strong {
  color: var(--text-muted);
}

/* ==============================================================================
   RESPONSIVENESS & ACCESSIBILITY
   ============================================================================== */
@media (max-width: 580px) {
  .app-shell {
    padding: 0.75rem 1rem 2rem;
  }
  
  .card-glass {
    padding: 1.5rem 1.25rem;
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .pills-row {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .timer-countdown {
    font-size: 3.25rem;
  }
  
  .active-actions-row {
    grid-template-columns: 1fr;
  }
  
  .secondary-btn-row {
    grid-template-columns: 1fr;
  }
  
  .three-step-preview {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .preview-arrow {
    transform: rotate(90deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
