# Dating Age Gate Design

**Date:** 2026-01-27
**Status:** Approved

## Overview

Lock the dating tab and dating interactions until the player reaches age 16.

## Requirements

- **Unlock age:** 16 years old
- **Locked state:** Dating segment visible in Social tab but shows locked view when selected
- **Locked view:** Themed card with lock icon, message, and player's current age

## Implementation

### Files to Modify

**`ios/lichunWebsocket/Features/Social/Views/SocialView.swift`**
- Add `isDatingUnlocked` computed property checking `player.c.ageYears >= 16`
- Conditionally render `DatingLockedView` when dating selected but locked

### Files to Create

**`ios/lichunWebsocket/Features/Dating/Views/DatingLockedView.swift`**
- Styled card with lock icon (SF Symbol `lock.fill`)
- "Dating Unlocks at 16" headline
- "You're currently {age} years old" subtext
- Uses existing `AppColors` and typography styles

## Edge Cases

| Scenario | Behavior |
|----------|----------|
| Player turns 16 mid-session | View updates automatically (reactive to `ageYears`) |
| Player already in relationship but under 16 | Still locked - age gate applies regardless |
| Save data from older version with relationship | Same as above |

## What's NOT Changing

- Messages tab - stays accessible at any age
- Backend - no server-side changes needed (client-only gate)
- Relationship data model - unchanged
