@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

:root {
  --primary: #880E4F;
  --primary-light: #AD1457;
  --primary-dark: #C2185B;
  --accent: #EC407A;
  --accent-light: #FCE4EC;
  --bg: #FAFAF5;
  --bg-card: #FFFFFF;
  --bg-elevated: #F5F5EC;
  --text: #1A1A1A;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E8E4DA;
  --success: #059669;
  --success-light: #D1FAE5;
  --danger: #DC2626;
  --danger-light: #FEE2E2;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 100px;
}

::selection {
  background: var(--primary-light);
  color: white;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 100px;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  padding: 2rem 1.5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.app-header::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.header-content {
  position: relative;
  z-index: 1;
}

.app-title {
  color: white;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.app-subtitle {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  font-weight: 400;
  margin-top: 0.125rem;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.75rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-btn:hover:not(.active) {
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

.tab-icon {
  font-size: 1.25rem;
}

.tab-label {
  white-space: nowrap;
}

/* Main Content */
.main-content {
  padding: 1rem;
}

/* Loading */
.loading-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.skeleton-card {
  height: 80px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--bg-elevated) 25%, #eee 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* Dashboard */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.week-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.week-range {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

.progress-ring-container {
  position: relative;
  width: 60px;
  height: 60px;
}

.progress-ring {
  width: 60px;
  height: 60px;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--bg-elevated);
  stroke-width: 6;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--success);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--success);
}

/* Stats Bar */
.stats-bar {
  display: flex;
  gap: 0.5rem;
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.stat-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* Assignments */
.assignments-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.assignment-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  animation: fadeSlideIn 0.35s ease both;
  border-left: 3px solid var(--accent);
}

.assignment-card.completed {
  border-left-color: var(--success);
  background: var(--success-light);
  opacity: 0.85;
}

.assignment-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.check-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.check-btn:hover {
  border-color: var(--primary-light);
  background: rgba(45, 106, 79, 0.05);
}

.check-btn.checked {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.assignment-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.chore-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}

.completed .chore-name {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.roommate-name {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.completed-time {
  color: var(--success);
  font-size: 0.75rem;
}

.regenerate-btn {
  display: none;
}

/* Generate Section */
.generate-section {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.generate-section h3 {
  font-size: 1.125rem;
  margin-top: 0.75rem;
}

.generate-section p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  margin-bottom: 1.25rem;
}

.generate-btn {
  font-size: 1rem;
  padding: 0.875rem 2rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-style: dashed;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  max-width: 320px;
  margin: 0 auto;
}

.empty-hints {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.hint-chip {
  padding: 0.375rem 0.875rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Manager Sections */
.manager-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.section-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(45, 106, 79, 0.05);
}

.btn-add {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.btn-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.4;
  transition: opacity 0.2s ease;
  padding: 0.375rem;
}

.btn-delete:hover {
  opacity: 1;
}

/* Forms */
.add-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeSlideIn 0.25s ease both;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.form-input {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

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

/* Avatar Picker */
.avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.avatar-option {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-option:hover {
  border-color: var(--primary-light);
  transform: scale(1.1);
}

.avatar-option.selected {
  border-color: var(--primary);
  background: rgba(45, 106, 79, 0.08);
  box-shadow: 0 0 0 2px rgba(45, 106, 79, 0.2);
}

/* Category Picker */
.category-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.category-option {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.category-option:hover {
  border-color: var(--primary-light);
}

.category-option.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.cat-icon {
  font-size: 0.875rem;
}

/* Frequency Picker */
.frequency-picker {
  display: flex;
  gap: 0.375rem;
}

.freq-option {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: center;
  transition: all 0.2s ease;
}

.freq-option:hover {
  border-color: var(--primary-light);
}

.freq-option.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Item Cards */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.item-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  animation: fadeSlideIn 0.35s ease both;
}

.item-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.item-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.chore-icon {
  border-radius: var(--radius-sm);
}

.item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
  min-width: 0;
}

.item-name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* History */
.history-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leaderboard {
  overflow: hidden;
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary-dark);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.lb-rank {
  width: 28px;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.lb-avatar {
  font-size: 1.25rem;
}

.lb-name {
  width: 80px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-bar-container {
  flex: 1;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.lb-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
  min-width: 4px;
}

.lb-pct {
  font-weight: 700;
  color: var(--primary);
  width: 36px;
  text-align: right;
  font-size: 0.75rem;
}

.lb-count {
  font-size: 0.6875rem;
  color: var(--text-muted);
  width: 36px;
  text-align: right;
}

/* Week Cards */
.weeks-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.week-card {
  animation: fadeSlideIn 0.35s ease both;
}

.week-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.week-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.week-label {
  font-weight: 700;
  font-size: 0.9375rem;
}

.current-badge {
  padding: 0.125rem 0.5rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.week-card-progress {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.week-assignments {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mini-assignment {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--bg-elevated);
}

.mini-assignment:last-child {
  border-bottom: none;
}

.mini-check {
  width: 20px;
  text-align: center;
  font-weight: 700;
}

.mini-assignment.done .mini-check {
  color: var(--success);
}

.mini-assignment.pending .mini-check {
  color: var(--text-muted);
}

.mini-chore {
  font-weight: 500;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-assignment.done .mini-chore {
  text-decoration: line-through;
  color: var(--text-muted);
}

.mini-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.mini-roommate {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 640px) {
  .app-header {
    padding: 1.5rem 1rem 1.25rem;
  }

  .app-title {
    font-size: 1.5rem;
  }

  .main-content {
    padding: 0.75rem;
  }

  .lb-name {
    width: 60px;
  }

  .lb-count {
    display: none;
  }
}

@media (min-width: 641px) {
  .app-container {
    margin-top: 1rem;
  }

  .app-header {
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .tab-nav {
    border-radius: 0;
  }
}
```

<!-- WALKTHROUGH_SCRIPT:
[
  {"step": 1, "narration": "Welcome to ChoreWheel — your fair chore rotation app! Let's start by adding your roommates.", "view": "user", "highlight_selector": ".tab-btn:nth-child(2)", "wait_for": "tap_to_continue"},
  {"step": 2, "narration": "Tap the Roommates tab, then hit '+ Add' to add each person who shares your space.", "view": "user", "highlight_selector": ".btn-add", "wait_for": "user_interaction"},
  {"step": 3, "narration": "Pick an avatar and enter their name. Add all your roommates this way.", "view": "user", "highlight_selector": ".add-form", "wait_for": "user_interaction"},
  {"step": 4, "narration": "Now switch to the Chores tab to add the household tasks that need rotating.", "view": "user", "highlight_selector": ".tab-btn:nth-child(3)", "wait_for": "tap_to_continue"},
  {"step": 5, "narration": "Add chores like dishes, vacuuming, or taking out the trash. Pick a category and frequency for each.", "view": "user", "highlight_selector": ".add-form", "wait_for": "user_interaction"},
  {"step": 6, "narration": "Head back to the This Week tab — you'll see a button to generate this week's assignments.", "view": "user", "highlight_selector": ".generate-btn", "wait_for": "user_interaction"},
  {"step": 7, "narration": "Assignments are auto-rotated fairly. Tap the circle next to each chore to mark it done when completed.", "view": "user", "highlight_selector": ".assignment-card", "wait_for": "tap_to_continue"},
  {"step": 8, "narration": "Check the History tab to see past rotations and the completion leaderboard. Happy cleaning!", "view": "user", "highlight_selector": ".tab-btn:nth-child(4)", "wait_for": "tap_to_continue"}
]
-->

.auth-gate {
  gap: 1rem;
}

.auth-card {
  text-align: center;
}

.auth-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  font-size: 2rem;
}

.auth-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
}

.auth-copy {
  color: var(--text-secondary);
  font-size: 0.875rem;
  max-width: 320px;
  margin: 0 auto 1rem;
}

.auth-actions {
  display: flex;
  justify-content: center;
}

.roommate-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.signed-in-user {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  max-width: 220px;
}

.signed-in-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.signed-in-avatar.fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

.signed-in-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-signout {
  padding: 0.5rem 0.875rem;
}

@media (max-width: 640px) {
  .section-header {
    align-items: flex-start;
    gap: 0.75rem;
  }

  .roommate-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .signed-in-user {
    max-width: 100%;
  }
}

.turn-notification {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  background: linear-gradient(135deg, rgba(45, 106, 79, 0.08), rgba(212, 163, 115, 0.08));
}

.turn-notification-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.turn-notification-copy {
  flex: 1;
  min-width: 0;
}

.turn-notification-copy h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.125rem;
}

.turn-notification-copy p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.turn-notification-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.turn-status {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-full);
}

.turn-status.active {
  background: var(--success-light);
  color: var(--success);
}

.turn-status.inactive {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.turn-banner {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.turn-banner-pill {
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.turn-banner-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .turn-notification,
  .turn-banner {
    flex-direction: column;
  }

  .turn-notification-actions {
    width: 100%;
    justify-content: space-between;
  }
}

.reaction-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reaction-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: rgba(45, 106, 79, 0.05);
}

.reaction-emoji {
  font-size: 0.875rem;
}

.reaction-count {
  font-weight: 700;
}

.reaction-history {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border);
}

.reaction-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.reaction-history-label {
  font-weight: 700;
  color: var(--primary-dark);
}

.reaction-history-count {
  color: var(--text-muted);
}

.reaction-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.reaction-history-chip {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.reaction-history-you {
  background: rgba(45, 106, 79, 0.08);
  color: var(--primary);
  font-weight: 600;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.chart-panel {
  overflow: hidden;
}

.chart-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.chart-panel-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

.chart-canvas-wrap {
  position: relative;
  min-height: 220px;
}

.chart-canvas {
  width: 100% !important;
  height: 220px !important;
}

.chart-empty-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.92));
  backdrop-filter: blur(1px);
  border-radius: 0 0 var(--radius) var(--radius);
}

@media (min-width: 641px) {
  .charts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.share-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.share-copy {
  min-width: 0;
}

.share-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.125rem;
}

.share-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.share-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.share-status {
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 600;
}

.btn-share {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .share-card {
    flex-direction: column;
    align-items: stretch;
  }

  .share-actions {
    justify-content: flex-start;
  }
}
