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

:root {
  --primary: #2C3E50;
  --secondary: #34495E;
  --tertiary: #7F8C8D;
  --dark: #BDC3C7;
  --light: #ECF0F1;
  --bg: #FAF6F0;
  --card-bg: #FFFFFF;
  --text: #4A3F35;
  --text-light: #8B7355;
  --text-muted: #B8A98E;
  --border: #E8D5B7;
  --shadow-sm: 0 1px 3px rgba(139,115,85,0.08);
  --shadow-md: 0 4px 12px rgba(139,115,85,0.1);
  --shadow-lg: 0 8px 24px rgba(139,115,85,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

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

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

html {
  scroll-behavior: smooth;
}

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

/* Loading Screen */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
}

.loading-pulse {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 1.2s ease-in-out infinite;
}

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

.loading-screen p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Role Selection Screen */
.role-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(194,178,128,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(232,213,183,0.2) 0%, transparent 50%),
    var(--bg);
}

.role-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.5s ease both;
}

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

.logo-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.role-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.welcome-name {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 28px;
  font-size: 0.9rem;
}

.role-buttons {
  display: flex;
  gap: 16px;
}

.role-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--light);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.role-icon {
  font-size: 2rem;
}

.role-label {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--dark);
}

.role-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* App Shell */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  font-size: 1.5rem;
}

.header-left h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge {
  background: var(--tertiary);
  color: var(--dark);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.switch-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'DM Sans', sans-serif;
}

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

.app-main {
  flex: 1;
  padding: 24px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--dark);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--dark);
  margin-bottom: 16px;
}

.closed-title {
  margin-top: 32px;
}

/* Buttons */
.create-btn {
  background: var(--primary);
  color: var(--light);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'DM Sans', sans-serif;
}

.create-btn:hover {
  background: var(--dark);
  transform: translateY(-1px);
}

.back-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 16px;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.2s ease;
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.empty-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--dark);
  margin-bottom: 4px;
}

.empty-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Polls Grid */
.polls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Poll Card */
.poll-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  animation: fadeInUp 0.4s ease both;
}

.poll-card:nth-child(1) { animation-delay: 0s; }
.poll-card:nth-child(2) { animation-delay: 0.05s; }
.poll-card:nth-child(3) { animation-delay: 0.1s; }
.poll-card:nth-child(4) { animation-delay: 0.15s; }
.poll-card:nth-child(5) { animation-delay: 0.2s; }
.poll-card:nth-child(6) { animation-delay: 0.25s; }

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

.closed-card {
  opacity: 0.75;
}

.poll-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-active {
  background: rgba(194,178,128,0.2);
  color: var(--dark);
  border: 1px solid var(--primary);
}

.status-closed {
  background: rgba(139,115,85,0.1);
  color: var(--text-muted);
  border: 1px solid var(--text-muted);
}

.status-draft {
  background: var(--tertiary);
  color: var(--text-light);
  border: 1px solid var(--secondary);
}

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

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

.poll-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.poll-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.poll-card-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif;
}

.view-btn, .results-btn {
  background: var(--tertiary);
  color: var(--dark);
}

.view-btn:hover, .results-btn:hover {
  background: var(--secondary);
}

.toggle-btn {
  background: var(--card-bg);
  color: var(--text-light);
}

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

.vote-btn {
  background: var(--primary);
  color: var(--light);
  border-color: var(--primary);
}

.vote-btn:hover {
  background: var(--dark);
  border-color: var(--dark);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74,63,53,0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: slideUp 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--tertiary);
  color: var(--dark);
}

/* Poll Creator */
.poll-creator h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--dark);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--light);
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(194,178,128,0.15);
}

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

.questions-section {
  margin-bottom: 16px;
}

.question-editor {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
}

.question-editor-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.q-number {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.85rem;
}

.q-type-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--card-bg);
  padding: 2px 8px;
  border-radius: 10px;
}

.remove-q-btn {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.remove-q-btn:hover {
  color: #c0392b;
}

.options-editor {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-marker {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--light);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.option-input {
  flex: 1;
}

.remove-opt-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.remove-opt-btn:hover {
  color: #c0392b;
}

.add-opt-btn {
  background: none;
  border: 1px dashed var(--border);
  color: var(--text-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.add-opt-btn:hover {
  border-color: var(--primary);
  color: var(--dark);
}

.rating-preview {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.add-question-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.add-q-btn {
  flex: 1;
  padding: 10px 16px;
  border: 1px dashed var(--primary);
  background: rgba(194,178,128,0.08);
  color: var(--dark);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.add-q-btn:hover {
  background: rgba(194,178,128,0.2);
}

.creator-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cancel-btn {
  padding: 10px 20px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-light);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.cancel-btn:hover {
  border-color: var(--dark);
  color: var(--dark);
}

.submit-btn {
  padding: 10px 24px;
  background: var(--primary);
  color: var(--light);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.submit-btn:hover:not(:disabled) {
  background: var(--dark);
}

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

/* Voting Form */
.voting-form {
  max-width: 640px;
  margin: 0 auto;
}

.voting-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--dark);
  margin-bottom: 24px;
}

.question-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  animation: fadeInUp 0.4s ease both;
}

.question-block:nth-child(2) { animation-delay: 0.05s; }
.question-block:nth-child(3) { animation-delay: 0.1s; }
.question-block:nth-child(4) { animation-delay: 0.15s; }

.question-text {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--dark);
  margin-bottom: 14px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--light);
}

.option-label:hover {
  border-color: var(--primary);
  background: rgba(194,178,128,0.08);
}

.option-label.selected {
  border-color: var(--primary);
  background: rgba(194,178,128,0.15);
  box-shadow: 0 0 0 2px rgba(194,178,128,0.2);
}

.option-label input[type="radio"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

.option-text {
  font-size: 0.95rem;
  color: var(--text);
}

.rating-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 4px;
}

.star-btn.active {
  color: var(--primary);
  transform: scale(1.1);
}

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

.rating-value {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
  margin-left: 8px;
}

.submit-vote-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: var(--light);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  font-family: 'DM Sans', sans-serif;
}

.submit-vote-btn:hover:not(:disabled) {
  background: var(--dark);
  transform: translateY(-1px);
}

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

/* Results */
.poll-results {
  animation: fadeInUp 0.4s ease both;
}

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.results-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--dark);
  margin-bottom: 8px;
}

.results-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vote-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.question-result {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  animation: fadeInUp 0.4s ease both;
}

.question-result:nth-child(2) { animation-delay: 0.05s; }
.question-result:nth-child(3) { animation-delay: 0.1s; }
.question-result:nth-child(4) { animation-delay: 0.15s; }

.question-result-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.q-num {
  background: var(--primary);
  color: var(--light);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.response-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.chart-container {
  height: 220px;
  position: relative;
}

.no-responses-yet {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 24px;
}

.no-votes {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
}

.no-votes .empty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

/* Content Loading Skeletons */
.content-loading {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

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

/* Responsive */
@media (max-width: 640px) {
  .app-header {
    padding: 12px 16px;
  }

  .header-left h1 {
    font-size: 1.1rem;
  }

  .user-badge {
    display: none;
  }

  .app-main {
    padding: 16px;
  }

  .role-card {
    padding: 32px 24px;
  }

  .role-buttons {
    flex-direction: column;
  }

  .role-btn {
    flex-direction: row;
    text-align: left;
    gap: 12px;
    padding: 16px;
  }

  .modal-content {
    padding: 24px;
    max-height: 90vh;
  }

  .polls-grid {
    grid-template-columns: 1fr;
  }

  .add-question-row {
    flex-direction: column;
  }

  .results-header {
    flex-direction: column;
  }

  .chart-container {
    height: 180px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .creator-actions {
    flex-direction: column;
  }

  .cancel-btn, .submit-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .role-card h1 {
    font-size: 1.6rem;
  }

  .star-btn {
    font-size: 1.6rem;
  }
}


<!-- WALKTHROUGH_SCRIPT:
[
  {"step": 1, "narration": "Welcome to Live Polls! Choose your role — Host to create polls, or Vote to respond to them.", "view": "all", "highlight_selector": ".role-buttons", "wait_for": "user_interaction"},
  {"step": 2, "narration": "As a Host, tap '+ New Poll' to create your first poll with multiple choice or rating questions.", "view": "host", "highlight_selector": ".create-btn", "wait_for": "user_interaction"},
  {"step": 3, "narration": "Give your poll a title, then add questions — choose Multiple Choice or Rating (1-5 stars).", "view": "host", "highlight_selector": ".poll-creator", "wait_for": "user_interaction"},
  {"step": 4, "narration": "Once created, your poll starts as Draft. Click 'Open' to make it live for respondents.", "view": "host", "highlight_selector": ".toggle-btn", "wait_for": "user_interaction"},
  {"step": 5, "narration": "Click 'View Results' to see real-time bar charts updating as votes come in.", "view": "host", "highlight_selector": ".view-btn", "wait_for": "tap_to_continue"},
  {"step": 6, "narration": "As a respondent, you'll see all active polls. Tap 'Vote Now' to submit your answers.", "view": "respondent", "highlight_selector": ".vote-btn", "wait_for": "user_interaction"},
  {"step": 7, "narration": "After voting, view the live results with bar charts showing how everyone responded.", "view": "respondent", "highlight_selector": ".results-btn", "wait_for": "tap_to_continue"}
]
-->

.poll-live-meta {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.live-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(194,178,128,0.15);
  border: 1px solid var(--primary);
  color: var(--dark);
  font-size: 0.8rem;
  font-weight: 600;
}

.live-meta {
  margin-top: -8px;
  margin-bottom: 14px;
  color: var(--text-light);
}

.timer-banner {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(194,178,128,0.14);
  border: 1px solid var(--primary);
  color: var(--dark);
  font-size: 0.85rem;
  font-weight: 600;
}

.timer-meta {
  margin-top: -8px;
  margin-bottom: 14px;
  color: var(--text-light);
}

.timer-ended {
  background: rgba(139,115,85,0.1);
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.timed-closed-state {
  margin-top: 8px;
}

.results-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.export-btn {
  background: var(--tertiary);
  color: var(--dark);
}

.export-btn:hover:not(:disabled) {
  background: var(--secondary);
}

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

.open-text-summary {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.open-text-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.open-text-summary-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(194,178,128,0.15);
  border: 1px solid var(--primary);
  color: var(--dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.open-text-summary-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.open-text-summary-text {
  color: var(--text);
  white-space: pre-wrap;
}

.open-text-summary-state {
  color: var(--text-light);
  font-style: italic;
}

.open-text-summary-error {
  color: #c0392b;
}
