.age-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 1;
  transition: opacity 300ms ease;
}

.age-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.age-modal {
  width: min(100%, 460px);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 2.2rem 2rem;
  text-align: center;
  box-shadow: 0 32px 80px rgba(17, 24, 39, 0.22), 0 0 60px rgba(37, 99, 235, 0.12);
  transform: scale(1) translateY(0);
  transition: transform 300ms cubic-bezier(.2,.8,.2,1), opacity 300ms ease;
  max-height: calc(100vh - 3rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.age-modal:focus {
  outline: none;
}

.age-overlay.hidden .age-modal {
  transform: scale(0.92) translateY(20px);
}

.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  box-shadow: 0 14px 40px rgba(37, 99, 235, 0.22);
}

.age-modal h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.age-modal .age-warning {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.age-sections {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.age-section {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
}

.age-section h4 {
  margin: 0 0 0.3rem 0;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-2);
}

.age-section p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.age-actions {
  display: grid;
  gap: 0.6rem;
  position: sticky;
  bottom: 0;
  background: var(--surface);
  padding-top: 0.8rem;
  margin-top: 0.2rem;
  border-top: 1px solid rgba(17, 24, 39, 0.10);
}

.age-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1rem;
  font-size: 1rem;
}

.age-decline {
  color: var(--muted-2);
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  transition: color 140ms ease, border-color 140ms ease;
}

.age-decline:hover {
  color: var(--muted);
  border-color: var(--border-2);
}

@supports (height: 100dvh) {
  .age-modal {
    max-height: calc(100dvh - 3rem);
  }
}

@media (max-width: 520px) {
  .age-overlay {
    padding: 1rem;
    align-items: flex-start;
  }

  .age-modal {
    padding: 1.25rem 1rem;
    border-radius: 18px;
    max-height: calc(100vh - 2rem);
  }

  @supports (height: 100dvh) {
    .age-modal {
      max-height: calc(100dvh - 2rem);
    }
  }

  .age-badge {
    width: 62px;
    height: 62px;
    font-size: 1.45rem;
    margin-bottom: 0.9rem;
  }

  .age-modal h2 {
    font-size: 1.2rem;
  }

  .age-section p {
    font-size: 0.92rem;
  }
}
