/**
 * CONSTELLATE • Libraries Against Loneliness
 * Component Styling: 1-Question-per-Screen Flow, Feeling Grid, 1-5 Scales,
 * Rotating Prompts, Consent Notice, Support Services, and TouchDesigner Mapping.
 * Stylized with "Colour palette.md" and "styleguide.pdf".
 */

/* ==========================================================================
   0. STEP PROGRESS BAR & REASSURANCE BANNER
   ========================================================================== */
.step-progress-wrapper {
  margin-bottom: 1.5rem;
  width: 100%;
}

.step-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.step-progress-badge {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-lime);
  background: rgba(236, 248, 192, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(236, 248, 192, 0.25);
}

.step-progress-count {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-muted);
  font-feature-settings: 'tnum';
}

.step-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.step-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #528B90 0%, #D2F7F9 50%, #ECF8C0 100%);
  border-radius: var(--radius-full);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(236, 248, 192, 0.5);
}

/* Reassurance Banner (Grounded in Variant 3: Eucalyptus Core & Olive Accent) */
.reassurance-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(37, 89, 83, 0.3);
  border: 1px solid rgba(140, 158, 80, 0.35);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-top: 1.75rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.reassurance-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.reassurance-text {
  font-size: 0.9rem;
  color: var(--accent-lime);
  line-height: 1.4;
}

/* ==========================================================================
   1. WELCOME SCREEN COMPONENTS
   ========================================================================== */
.welcome-hero {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.welcome-emblem {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-emblem-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px dashed rgba(236, 248, 192, 0.45);
  animation: rotateRing 40s linear infinite;
}

.welcome-emblem-pulse {
  position: absolute;
  width: 82%;
  height: 82%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 248, 192, 0.25) 0%, rgba(82, 139, 144, 0.15) 50%, transparent 70%);
  animation: emblemPulse 4s ease-in-out infinite;
}

.welcome-emblem-icon {
  width: 76px;
  height: 76px;
  z-index: 2;
  filter: drop-shadow(0 0 16px rgba(236, 248, 192, 0.6));
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes emblemPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.55; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

.welcome-features {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0 2rem 0;
  width: 100%;
}

.feature-pill {
  flex: 1;
  background: rgba(16, 45, 55, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.feature-icon {
  font-size: 1.35rem;
}

.feature-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* ==========================================================================
   2. QUESTION 1: EMOTION / FEELING SELECTION (Word + Icon, Not Color Alone)
   ========================================================================== */
/* Star Viewing Stage Spacers */
.star-stage-spacer {
  width: 100%;
  pointer-events: none;
  flex-shrink: 0;
}

.feeling-stage-spacer {
  height: 6vh;
  min-height: 40px;
  max-height: 80px;
}

.scale-stage-spacer {
  height: 20vh;
  min-height: 150px;
  max-height: 220px;
}

.success-star-stage {
  width: 100%;
  height: 40vh;
  min-height: 280px;
  max-height: 420px;
  pointer-events: none;
  flex-shrink: 0;
}

.feelings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin: 1.25rem 0 2rem 0;
  width: 100%;
}

.feeling-card {
  position: relative;
  min-height: 108px;
  background: rgba(10, 24, 32, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(135, 178, 184, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  text-align: center;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.45);
}

.feeling-card:hover {
  background: rgba(14, 34, 46, 0.94);
  border-color: rgba(236, 248, 192, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.6);
}

.feeling-card:focus-visible {
  border-color: var(--accent-lime);
  box-shadow: 0 0 0 3px rgba(236, 248, 192, 0.4);
}

.feeling-card.selected {
  background: rgba(16, 44, 56, 0.96);
  border-color: var(--accent-lime);
  box-shadow: 0 0 22px rgba(236, 248, 192, 0.3), inset 0 0 14px rgba(236, 248, 192, 0.08);
  transform: scale(1.02);
}

.feeling-icon {
  font-size: 2.1rem;
  line-height: 1;
}

.feeling-label {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.feeling-desc {
  font-size: 0.82rem;
  color: #d2f7f9;
  font-weight: 500;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.feeling-card.selected .feeling-desc {
  color: #FFFFFF;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Accessibility Checkmark Badge on Selected Card */
.feeling-check-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-lime);
  color: var(--core-1);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
}

.feeling-card.selected .feeling-check-badge {
  display: flex;
}

/* ==========================================================================
   3. QUESTIONS 2-4: 1 TO 5 STEP SCALES (Large Touch Targets & Synced Sliders)
   ========================================================================== */
.question-card {
  background: rgba(10, 24, 32, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(135, 178, 184, 0.28);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.8rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}

.question-header {
  margin-bottom: 1.1rem;
}

.question-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.question-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Current Value Pill Indicator */
.scale-current-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 36, 46, 0.85);
  border: 1px solid rgba(236, 248, 192, 0.15);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.15rem;
  margin-bottom: 1.1rem;
}

.scale-badge-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.scale-val-big {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent-lime);
  line-height: 1;
}

.scale-val-total {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.scale-badge-label {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-lime);
}

.scale-badge-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* 1-5 Step Cards Row */
.scale-step-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.scale-step-btn {
  min-height: 74px;
  background: rgba(16, 45, 55, 0.5);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.scale-step-btn:hover {
  background: rgba(82, 139, 144, 0.2);
  border-color: rgba(236, 248, 192, 0.35);
  transform: translateY(-2px);
}

.scale-step-btn:focus-visible {
  border-color: var(--accent-lime);
  box-shadow: 0 0 0 2px rgba(236, 248, 192, 0.4);
}

.scale-step-btn.active {
  background: linear-gradient(135deg, rgba(82, 139, 144, 0.5) 0%, rgba(236, 248, 192, 0.25) 100%);
  border-color: var(--accent-lime);
  box-shadow: 0 0 16px rgba(236, 248, 192, 0.3);
  transform: scale(1.03);
}

.scale-step-num {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1;
}

.scale-step-btn.active .scale-step-num {
  color: var(--accent-lime);
}

.scale-step-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
  line-height: 1.25;
}

.scale-step-btn.active .scale-step-text {
  color: #FFFFFF;
  font-weight: 600;
}

/* Custom Range Slider */
.scale-slider-row {
  margin-top: 1rem;
}

.kiosk-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: var(--radius-full);
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
}

.kiosk-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 16px rgba(236, 248, 192, 0.9), 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  border: 2px solid var(--core-1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kiosk-slider::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 16px rgba(236, 248, 192, 0.9), 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  border: 2px solid var(--core-1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kiosk-slider:active::-webkit-slider-thumb {
  transform: scale(1.15);
  box-shadow: 0 0 24px rgba(236, 248, 192, 1);
}

/* Endpoints Spectrum */
.scale-range-endpoints {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* ==========================================================================
   4. OPEN-ENDED REFLECTION, CONSENT, & DUAL INPUT
   ========================================================================== */
.consent-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(37, 89, 83, 0.25);
  border: 1px solid rgba(140, 158, 80, 0.35);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.consent-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.consent-content {
  flex: 1;
}

.consent-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-lime);
  margin-bottom: 0.25rem;
}

.consent-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Prompt Card */
.prompt-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.85rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.prompt-pulse {
  animation: promptPulseAnim 0.35s ease-out;
}

@keyframes promptPulseAnim {
  0% { transform: scale(0.98); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

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

.prompt-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--core-1);
  background: var(--accent-lime);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
}

.btn-cycle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(236, 248, 192, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cycle:hover {
  background: rgba(236, 248, 192, 0.16);
  color: var(--accent-lime);
  border-color: rgba(236, 248, 192, 0.35);
}

.prompt-question-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.45;
  color: #FFFFFF;
  margin-bottom: 0.5rem;
}

.prompt-guidance-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
  font-style: italic;
}

/* Dual Input Mode Selector Tabs */
.input-mode-tabs {
  display: flex;
  gap: 0.6rem;
  background: rgba(8, 23, 29, 0.6);
  padding: 0.4rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-subtle);
}

.tab-mode {
  flex: 1;
  min-height: 48px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-mode.active {
  background: rgba(236, 248, 192, 0.15);
  color: var(--accent-lime);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Mode Panel: Text Area */
.text-input-wrapper {
  position: relative;
  background: rgba(8, 23, 29, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input-wrapper:focus-within {
  border-color: var(--accent-lime);
  box-shadow: 0 0 16px rgba(236, 248, 192, 0.25);
}

.reflection-textarea {
  width: 100%;
  min-height: 120px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  resize: none;
}

.reflection-textarea::placeholder {
  color: var(--text-dim);
  font-style: italic;
}

.text-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.char-counter {
  font-weight: 600;
  font-feature-settings: 'tnum';
}

.char-limit-near {
  color: #F87171;
}

/* Mode Panel: Audio Recording (MediaRecorder API strictly 30s) */
.audio-recorder-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.75rem 1.5rem 1.25rem 1.5rem;
  background: rgba(16, 45, 55, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-card);
}

/* Guidance Header for Voice Recording (matches text input context) */
.audio-guidance-header {
  margin-bottom: 0.95rem;
  text-align: center;
  max-width: 480px;
}

.audio-guidance-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
  transition: color 0.25s ease;
}

.audio-guidance-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.visualizer-canvas-wrapper {
  width: 100%;
  max-width: 480px;
  height: 72px;
  margin-bottom: 1.25rem;
  background: rgba(8, 23, 29, 0.65);
  border: 1px solid rgba(236, 248, 192, 0.16);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 15px rgba(236, 248, 192, 0.05);
}

#audio-visualizer-canvas {
  width: 100%;
  height: 100%;
}

.audio-timer-display {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-lime);
  margin-bottom: 1.25rem;
  font-feature-settings: 'tnum';
}

.timer-warning {
  color: var(--accent-olive);
  text-shadow: 0 0 12px rgba(140, 158, 80, 0.6);
}

.btn-record-mic {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ECF8C0 0%, #D2F7F9 100%);
  border: none;
  color: var(--core-1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(236, 248, 192, 0.45);
  transition: all 0.25s ease;
}

.btn-record-mic:hover {
  transform: scale(1.08);
  box-shadow: 0 0 32px rgba(236, 248, 192, 0.7);
}

.btn-record-stop {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--core-1);
  border: 3px solid var(--accent-lime);
  color: var(--accent-lime);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: pulseRecordingLime 1.5s infinite;
}

@keyframes pulseRecordingLime {
  0%, 100% {
    box-shadow: 0 0 15px rgba(236, 248, 192, 0.45), 0 0 30px rgba(210, 247, 249, 0.2);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 28px rgba(236, 248, 192, 0.85), 0 0 45px rgba(210, 247, 249, 0.35);
    transform: scale(1.04);
  }
}

.recording-indicator-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--accent-lime);
  font-weight: 600;
  margin-top: 0.95rem;
  background: rgba(236, 248, 192, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(236, 248, 192, 0.2);
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 10px var(--accent-lime);
  animation: recBlink 1s infinite;
}

@keyframes recBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* Bottom Meta Row (matching .text-meta-row) */
.audio-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(236, 248, 192, 0.1);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.audio-status-badge {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--accent-lime);
  background: rgba(236, 248, 192, 0.1);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(236, 248, 192, 0.22);
  font-feature-settings: 'tnum';
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.audio-status-badge.recording {
  background: rgba(236, 248, 192, 0.22);
  border-color: var(--accent-lime);
  box-shadow: 0 0 12px rgba(236, 248, 192, 0.45);
}

.audio-playback-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.audio-playback-player {
  width: 100%;
  max-width: 420px;
  outline: none;
}

.audio-duration-badge {
  font-size: 0.85rem;
  color: var(--accent-lime);
  font-weight: 600;
}

.audio-error-alert {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: #FCA5A5;
  font-size: 0.85rem;
}

/* Action Cluster */
.open-actions-cluster {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.open-actions-primary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.btn-skip-reflection {
  background: transparent;
  border: 1px dashed rgba(236, 248, 192, 0.28);
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
}

.btn-skip-reflection:hover {
  background: rgba(236, 248, 192, 0.08);
  color: var(--accent-lime);
  border-color: rgba(236, 248, 192, 0.5);
}

/* ==========================================================================
   5. STAR CONFIRMATION & SUPPORT LINKS
   ========================================================================== */
.kiosk-screen#screen-success {
  justify-content: flex-start;
  padding-top: 0.5rem;
  padding-bottom: 3.5rem;
}

.success-star-stage {
  width: 100%;
  height: 40vh;
  min-height: 280px;
  max-height: 420px;
  pointer-events: none;
  flex-shrink: 0;
}

.success-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.25rem 2rem;
  width: 100%;
  margin-top: 0;
}

/* Summary Pills */
.checkin-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0 1.5rem 0;
}

.summary-pill {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(16, 45, 55, 0.6);
  border: 1px solid rgba(236, 248, 192, 0.18);
  color: var(--accent-lime);
}

/* TouchDesigner Parameters Breakdown */
.td-parameters-card {
  width: 100%;
  max-width: 580px;
  background: rgba(8, 23, 29, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.25rem 0 1.75rem 0;
  text-align: left;
}

.td-parameters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(236, 248, 192, 0.1);
  padding-bottom: 0.5rem;
}

.td-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-lime);
}

.td-param-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.td-param-item {
  display: flex;
  flex-direction: column;
}

.td-param-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.td-param-value {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: #FFFFFF;
}

/* Support Services Section (Mandatory from To change.md: RMIT Counselling & Headspace) */
.support-services-container {
  width: 100%;
  max-width: 580px;
  background: rgba(16, 45, 55, 0.92);
  border: 1px solid rgba(82, 139, 144, 0.45);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0 1.25rem 0;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.support-services-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.support-services-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-lime);
}

.support-services-intro {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.support-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.support-card-item {
  background: rgba(8, 23, 29, 0.55);
  border: 1px solid rgba(236, 248, 192, 0.1);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.support-card-info {
  flex: 1;
}

.support-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 0.2rem;
}

.support-card-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.support-card-hours {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.support-call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(236, 248, 192, 0.14);
  color: var(--accent-lime);
  border: 1px solid rgba(236, 248, 192, 0.32);
  border-radius: var(--radius-full);
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.support-call-btn:hover {
  background: var(--accent-lime);
  color: var(--core-1);
}

.success-countdown-pill {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.4rem;
}

.badge-dot.live {
  background: var(--accent-lime);
  box-shadow: 0 0 8px var(--accent-lime);
}

.badge-dot.local {
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
}

/* ==========================================================================
   6. OPERATOR & TOUCHDESIGNER DRAWER MODAL
   ========================================================================== */
.dev-field {
  margin-bottom: 1.25rem;
}

.dev-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.dev-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(8, 23, 29, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.88rem;
  outline: none;
}

.dev-input:focus {
  border-color: var(--accent-lime);
}

.dev-code-box {
  background: #08171D;
  border: 1px solid rgba(236, 248, 192, 0.15);
  border-radius: var(--radius-sm);
  padding: 1rem;
  max-height: 220px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--accent-lime);
  white-space: pre-wrap;
  word-break: break-all;
  user-select: text;
  -webkit-user-select: text;
}

.status-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.status-alert.success {
  background: rgba(37, 89, 83, 0.35);
  border: 1px solid rgba(236, 248, 192, 0.4);
  color: var(--accent-lime);
}

.status-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
}

.status-alert.info {
  background: rgba(82, 139, 144, 0.25);
  border: 1px solid rgba(210, 247, 249, 0.3);
  color: var(--accent-2);
}

/* ==========================================================================
   7. ACCESSIBILITY: PREFERS-REDUCED-MOTION SUPPORT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .welcome-emblem-ring,
  .welcome-emblem-pulse,
  .star-preview-aura,
  .btn-pulse,
  .prompt-pulse,
  .btn-record-stop,
  .rec-dot {
    animation: none !important;
  }
  #constellation-bg {
    opacity: 0.35;
  }
}

/* ==========================================================================
   8. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 680px) {
  .feelings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .scale-step-cards {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .scale-step-btn {
    min-height: 52px;
    flex-direction: row;
    justify-content: flex-start;
    padding: 0.6rem 1rem;
    gap: 0.75rem;
  }
  .scale-step-text {
    text-align: left;
  }
  .welcome-features {
    flex-direction: column;
    gap: 0.75rem;
  }
  .td-param-grid {
    grid-template-columns: 1fr;
  }
  .support-card-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .support-call-btn {
    align-self: flex-start;
    margin-top: 0.4rem;
  }
  .question-card {
    padding: 1.5rem 1.25rem;
  }
}
