@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --primary: #263238;
  --primary-light: #37474F;
  --primary-dark: #455A64;
  --secondary: #90A4AE;
  --accent: #CFD8DC;
  --accent-light: #FCD34D;
  --success: #10B981;
  --error: #EF4444;
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-elevated: #F1F5F9;
  --text: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-focus: #4F46E5;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
}

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

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

html {
  scroll-behavior: smooth;
}

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

.app-shell {
  min-height: 100vh;
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 80px;
}

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

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

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

.app-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
}

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

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

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

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

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}

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

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

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

/* Search & Filters */
.filters-bar {
  margin-bottom: 1.25rem;
}

.search-wrapper {
  position: relative;
  margin-bottom: 0.75rem;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.filter-row {
  display: flex;
  gap: 0.5rem;
}

.filter-select {
  flex: 1;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.filter-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* Talk Cards */
.talks-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.talk-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.125rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  font-family: inherit;
  color: var(--text);
  animation: fadeInUp 0.4s ease both;
}

.talk-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.talk-card:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

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

.talk-room-badge {
  display: inline-block;
  padding: 0.2rem 0.625rem;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.talk-rating-badge {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

.talk-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.375rem;
  color: var(--text);
}

.talk-speaker {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.talk-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.talk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.175rem 0.5rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(14, 165, 233, 0.08));
  color: var(--primary);
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: var(--radius-full);
}

.tag-chip.removable {
  padding-right: 0.25rem;
}

.tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  transition: background 0.15s ease;
}

.tag-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

/* Detail View */
.detail-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  color: var(--primary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.375rem 0;
  transition: color 0.15s ease;
}

.back-btn:hover {
  color: var(--primary-dark);
}

.detail-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--primary);
}

.detail-room-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.detail-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.detail-speaker {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.detail-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.detail-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

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

.stats-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.rating-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rating-bar-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 75px;
}

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

.rating-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.rating-bar-value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  min-width: 28px;
  text-align: right;
}

.overall-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

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

.overall-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

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

.rate-card.already-rated {
  border-left: 3px solid var(--success);
}

.rate-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.rating-field {
  margin-bottom: 1.25rem;
}

.rating-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.125rem;
}

.rating-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Star Picker */
.star-picker {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.star-btn {
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--border);
  transition: all 0.15s ease;
  padding: 0.125rem;
  line-height: 1;
}

.star-btn.filled {
  color: var(--accent);
  text-shadow: 0 1px 4px rgba(245, 158, 11, 0.3);
}

.star-btn:hover {
  transform: scale(1.15);
}

.star-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
  font-weight: 500;
}

.star-display {
  font-size: 1rem;
}

.star-filled {
  color: var(--accent);
}

.star-empty {
  color: var(--border);
}

.comment-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text);
  resize: vertical;
  transition: border-color 0.2s ease;
}

.comment-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.submit-rating-btn {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-rating-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

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

.your-rating-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.your-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

.your-comment {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* Reviews */
.reviews-section {
  margin-top: 0.5rem;
}

.reviews-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

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

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  animation: fadeInUp 0.3s ease both;
}

.review-scores {
  display: flex;
  gap: 0.875rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.review-comment {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Success Banner */
.success-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  animation: fadeInUp 0.3s ease both;
}

/* Add Talk Form */
.add-talk-container {
  max-width: 100%;
}

.add-talk-header {
  margin-bottom: 1.25rem;
}

.add-talk-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.add-talk-header p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.add-talk-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.125rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  background: var(--bg-card);
}

.form-textarea {
  resize: vertical;
}

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

.tag-input-wrapper {
  display: flex;
  gap: 0.5rem;
}

.tag-field {
  flex: 1;
}

.tag-add-btn {
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tag-add-btn:hover {
  background: var(--border);
}

.tags-display {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.submit-talk-btn {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.submit-talk-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

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

/* Leaderboard */
.leaderboard-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leaderboard-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.leaderboard-header p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.125rem;
}

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

.ranking-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  font-family: inherit;
  color: var(--text);
  animation: fadeInUp 0.4s ease both;
}

.ranking-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.ranking-card:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.rank-position {
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}

.rank-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-muted);
}

.rank-number.top-1 { font-size: 1.375rem; }
.rank-number.top-2 { font-size: 1.25rem; }
.rank-number.top-3 { font-size: 1.25rem; }
.rank-number.unrated { color: var(--border); }

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-speaker {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

.rank-meta {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.rank-room {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
}

.rank-count {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.rank-scores {
  flex-shrink: 0;
  text-align: right;
}

.rank-overall {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
}

.rank-overall.unrated {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.rank-breakdown {
  display: flex;
  gap: 0.5rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-state h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.empty-state p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 280px;
}

/* Skeleton Loading */
.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--border) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: shimmer 1.5s infinite;
  margin-bottom: 0.625rem;
}

.skeleton-line:last-child {
  margin-bottom: 0;
}

.skeleton-line.wide { width: 80%; }
.skeleton-line.medium { width: 55%; }
.skeleton-line.narrow { width: 35%; }

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .app-main {
    padding: 0.75rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .rank-title {
    font-size: 0.8125rem;
  }

  .rank-breakdown {
    display: none;
  }

  .leaderboard-stats {
    gap: 0.5rem;
  }

  .stat-value {
    font-size: 1.25rem;
  }
}
```

<!-- WALKTHROUGH_SCRIPT:
[
  {"step": 1, "narration": "Welcome to TalkRate — your personal conference talk rating companion. You'll see the Talks tab is active by default, ready for you to browse the schedule.", "view": "user", "highlight_selector": ".tab-btn.active", "wait_for": "tap_to_continue"},
  {"step": 2, "narration": "The talks list is empty right now. Let's add your first conference talk. Tap the '+ Add Talk' tab.", "view": "user", "highlight_selector": ".tab-btn:nth-child(3)", "wait_for": "user_interaction"},
  {"step": 3, "narration": "Fill in the talk details — title, speaker, time slot, and room. You can also add tags like 'React' or 'AI' and a description.", "view": "user", "highlight_selector": ".add-talk-form", "wait_for": "user_interaction"},
  {"step": 4, "narration": "After adding a talk, you'll be taken back to the Talks list where your new talk appears as a card. Tap on any talk to see its details and rate it.", "view": "user", "highlight_selector": ".talks-grid", "wait_for": "user_interaction"},
  {"step": 5, "narration": "On the talk detail page, you can rate the talk on three dimensions: Content Quality, Delivery, and Relevance — each on a 1-5 star scale. Add an optional comment and submit.", "view": "user", "highlight_selector": ".rate-card", "wait_for": "user_interaction"},
  {"step": 6, "narration": "Once you rate a talk, you'll see aggregated ratings with visual bar charts showing the average for each category, plus an overall score.", "view": "user", "highlight_selector": ".stats-card", "wait_for": "tap_to_continue"},
  {"step": 7, "narration": "Head to the Rankings tab to see all talks ranked by their overall average rating. The top 3 get medal badges. Tap any ranked talk to jump to its detail view.", "view": "user", "highlight_selector": ".tab-btn:nth-child(2)", "wait_for": "user_interaction"},
  {"step": 8, "narration": "Use the search bar and filters on the Talks tab to find specific talks by title or speaker, filter by room, or sort by time, rating, or title. Enjoy the conference!", "view": "user", "highlight_selector": ".filters-bar", "wait_for": "tap_to_continue"}
]
-->

.identity-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.identity-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.identity-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.identity-count {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(79, 70, 229, 0.08);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-full);
}

.talk-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.my-rating-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .identity-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.header-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}

.presence-panel {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.presence-panel-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.presence-attendees {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.presence-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.16);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
}

.presence-empty {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8125rem;
}

@media (max-width: 640px) {
  .header-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .presence-badge {
    width: 100%;
    justify-content: center;
  }
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.chart-header {
  margin-bottom: 0.75rem;
}

.chart-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.chart-header p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

.chart-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}

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

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

.qr-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

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

.qr-url {
  font-size: 0.6875rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  word-break: break-all;
  max-width: 220px;
}

.qr-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
}

.qr-image {
  display: block;
  width: 180px;
  height: 180px;
  background: white;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.qr-placeholder {
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 1rem;
  font-size: 0.875rem;
}

.print-qr-btn {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.print-qr-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

@media print {
  .no-print,
  .back-btn,
  .rate-card,
  .reviews-section,
  .stats-card:not(.qr-card) {
    display: none !important;
  }

  .detail-container {
    gap: 0.75rem;
  }

  .qr-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
  }

  .qr-url {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .qr-card-header {
    flex-direction: column;
  }

  .qr-url {
    max-width: 100%;
  }
}

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

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

.summary-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

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

.summary-refresh-btn {
  flex-shrink: 0;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.summary-refresh-btn:hover:not(:disabled) {
  border-color: var(--primary-light);
  color: var(--primary);
}

.summary-refresh-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.summary-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

.summary-empty {
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

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

  .summary-refresh-btn {
    width: 100%;
  }
}

.report-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pdf-export-btn {
  width: 100%;
  padding: 0.875rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: white;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

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

.pdf-export-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.pdf-report {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 800px;
  background: white;
  color: #0F172A;
  padding: 24px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.pdf-report-header {
  margin-bottom: 18px;
  border-bottom: 2px solid #E2E8F0;
  padding-bottom: 12px;
}

.pdf-report-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  margin-bottom: 4px;
}

.pdf-report-header p {
  color: #64748B;
  font-size: 13px;
}

.pdf-section {
  margin-bottom: 18px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.pdf-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  margin-bottom: 8px;
  color: #1E293B;
}

.pdf-section p,
.pdf-section li {
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
}

.pdf-section ul {
  margin-left: 18px;
}

.pdf-comments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pdf-comment-item {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 12px;
}

.pdf-comment-meta {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  margin-bottom: 4px;
}

.pdf-comment-text {
  font-size: 13px;
  color: #0F172A;
  margin-bottom: 6px;
}

.pdf-comment-scores {
  font-size: 11px;
  color: #475569;
}

@media print {
  .report-actions,
  .pdf-report {
    display: block;
  }
}
