/* ============================================
   CSS Variables
   ============================================ */
:root {
  /* Colors */
  --bg: #FFFFFF;
  --surface: #F5F5F5;
  --text: #000000;
  --text-muted: #6B6B6B;

  /* Buttons */
  --btn-primary-bg: #000000;
  --btn-primary-text: #FFFFFF;
  --btn-secondary-bg: #F5F5F5;
  --btn-secondary-text: #000000;

  /* Scenarios */
  --color-scared: #FF3B30;
  --color-stuck: #FF9500;
  --color-bored: #AF52DE;

  /* States */
  --disabled: #CCCCCC;
  --success: #34C759;

  /* Museum */
  --chest-color: #FF9500;
  --chest-color-dark: #E68500;

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;

  --text-xs: 14px;
  --text-sm: 16px;
  --text-md: 18px;
  --text-lg: 24px;
  --text-xl: 32px;
  --text-2xl: 40px;
  --text-3xl: 48px;

  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-black: 900;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Misc */
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;

  --transition: 200ms ease;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: var(--font-normal);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
}

/* ============================================
   Screen Container
   ============================================ */
.screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  animation: fadeIn var(--transition);
}

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

/* Tablet+ */
@media (min-width: 429px) {
  .screen {
    padding: var(--space-xl);
    max-width: 500px;
    margin: 0 auto;
  }
}

/* Desktop */
@media (min-width: 769px) {
  .screen {
    max-width: 440px;
  }
}

/* ============================================
   Typography
   ============================================ */
.heading-xl {
  font-size: var(--text-2xl);
  font-weight: var(--font-black);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.heading-lg {
  font-size: var(--text-xl);
  font-weight: var(--font-black);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.heading-md {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  line-height: 1.3;
}

.text-body {
  font-size: var(--text-sm);
  font-weight: var(--font-normal);
  color: var(--text);
}

.text-muted {
  font-size: var(--text-xs);
  font-weight: var(--font-normal);
  color: var(--text-muted);
}

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

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  padding: 0 var(--space-lg);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn:disabled:active {
  transform: none;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  height: auto;
  padding: var(--space-sm) var(--space-md);
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
}

.card-interactive {
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.card-interactive:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* ============================================
   Inputs
   ============================================ */
.input,
.textarea {
  width: 100%;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font);
  font-size: var(--text-sm);
  color: var(--text);
  outline: none;
  transition: box-shadow var(--transition);
}

.input:focus,
.textarea:focus {
  box-shadow: 0 0 0 2px var(--text);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
  opacity: var(--placeholder-opacity, 1);
  transition: opacity 0.3s ease;
}

/* Smooth placeholder animation for dont inputs */
.dont-input::placeholder {
  animation: placeholderPulse 8s ease-in-out infinite;
}

/* Stop animation when user has typed content */
.dont-input.has-content::placeholder {
  animation: none;
  opacity: 0.6;
}

/* Placeholder animations for stuck screen */
.stuck-initial-input::placeholder,
.stuck-compress-input::placeholder {
  animation: placeholderPulse 8s ease-in-out infinite;
}

/* Placeholder animations for microstep and mise inputs */
.microstep-input::placeholder,
.mise-input::placeholder {
  animation: placeholderPulse 8s ease-in-out infinite;
}

/* Stop animation when user has typed content */
.microstep-input.has-content::placeholder,
.mise-input.has-content::placeholder {
  animation: none;
  opacity: 0.6;
}

@keyframes placeholderPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.85; }
}

.textarea {
  min-height: 120px;
  resize: none;
  line-height: 1.5;
}

/* ============================================
   Time Selector
   ============================================ */
.time-selector {
  display: flex;
  gap: var(--space-sm);
}

.time-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-sm);
  background: var(--surface);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.time-option:active {
  transform: scale(0.96);
}

.time-option.selected {
  background: var(--text);
  color: var(--bg);
}

/* ============================================
   Emotion Cards (Triage)
   ============================================ */
.emotion-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
}

.emotion-card .emoji {
  font-size: 32px;
  line-height: 1;
}

.emotion-card .content {
  flex: 1;
}

.emotion-card .title {
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-xs);
}

.emotion-card .subtitle {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ============================================
   Header (Back + Step indicator)
   ============================================ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: none;
  border: none;
  font-family: var(--font);
  font-size: var(--text-xs);
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-sm);
  margin: calc(-1 * var(--space-sm));
  -webkit-tap-highlight-color: transparent;
}

.step-indicator {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ============================================
   Form Layout
   ============================================ */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* ============================================
   Spacers
   ============================================ */
.spacer {
  flex: 1;
}

.gap-sm { height: var(--space-sm); }
.gap-md { height: var(--space-md); }
.gap-lg { height: var(--space-lg); }
.gap-xl { height: var(--space-xl); }
.gap-2xl { height: var(--space-2xl); }

/* ============================================
   Pixel Art Grid
   ============================================ */
.pixel-container {
  display: flex;
  justify-content: center;
  padding: var(--space-xl) 0;
}

.pixel-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  width: 200px;
  height: 200px;
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-xl);
}

.pixel-cell {
  aspect-ratio: 1;
  background: var(--bg);
  border-radius: 4px;
  transition: background var(--transition), transform 0.3s ease;
}

.pixel-cell.revealed {
  background: var(--text);
  animation: pixelPop 0.3s ease;
}

@keyframes pixelPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ============================================
   Timer Screen
   ============================================ */
.timer-context {
  margin-top: var(--space-lg);
}

.timer-context .task-name {
  font-weight: var(--font-bold);
  margin-bottom: var(--space-xs);
}

.timer-context .task-detail {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.pause-btn {
  margin-top: auto;
  padding: var(--space-lg);
}

/* ============================================
   Overlay (Paused / Focus Lost)
   ============================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  z-index: 100;
  animation: fadeIn var(--transition);
}

.overlay-emoji {
  font-size: 64px;
  margin-bottom: var(--space-lg);
}

.overlay-title {
  font-size: var(--text-xl);
  font-weight: var(--font-black);
  margin-bottom: var(--space-sm);
}

.overlay-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.overlay-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  max-width: 280px;
}

/* ============================================
   Stats Screen
   ============================================ */
.stats-hero {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-black);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.stats-section {
  margin-bottom: var(--space-xl);
}

.stats-section-title {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* Scenario bars */
.scenario-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.scenario-bar .emoji {
  font-size: 20px;
  width: 28px;
}

.scenario-bar .bar-container {
  flex: 1;
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}

.scenario-bar .bar-fill {
  height: 100%;
  background: var(--text);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.scenario-bar .count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  width: 20px;
  text-align: right;
}

/* Achievements */
.achievement {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
}

.achievement-icon {
  font-size: var(--text-sm);
  width: 24px;
  text-align: center;
}

.achievement-name {
  font-size: var(--text-sm);
}

.achievement.locked {
  opacity: 0.4;
}

/* ============================================
   Success Screen
   ============================================ */
.success-emoji {
  font-size: 80px;
  text-align: center;
  margin: var(--space-xl) 0;
  animation: successBounce 0.5s ease;
}

@keyframes successBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* ============================================
   Checklist (Bored flow)
   ============================================ */
.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.checklist-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.checklist-checkbox.checked {
  background: var(--text);
  border-color: var(--text);
}

.checklist-checkbox.checked::after {
  content: '✓';
  color: var(--bg);
  font-size: 14px;
  font-weight: bold;
}

.checklist-input {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--font);
  font-size: var(--text-sm);
  color: var(--text);
  outline: none;
}

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

.checklist-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-md);
  cursor: pointer;
  padding: var(--space-xs);
  opacity: 0.5;
  transition: opacity var(--transition);
}

.checklist-remove:hover {
  opacity: 1;
}

.add-item-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: none;
  border: none;
  font-family: var(--font);
  font-size: var(--text-xs);
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-md) 0;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================
   Don'ts List (Scared flow)
   ============================================ */
.donts-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.dont-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.dont-number {
  font-size: var(--text-xs);
  color: var(--text-muted);
  width: 20px;
}

.dont-input {
  flex: 1;
}

/* ============================================
   Word Counter (Stuck flow)
   ============================================ */
.word-counter {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: right;
  margin-top: var(--space-sm);
}

.word-counter.over-limit {
  color: var(--color-scared);
}

.previous-text {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.arrow-down {
  text-align: center;
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* ============================================
   Divider
   ============================================ */
.divider {
  height: 1px;
  background: var(--surface);
  margin: var(--space-lg) 0;
}

/* ============================================
   Keep Going Options
   ============================================ */
.keep-going {
  margin-bottom: var(--space-md);
}

.keep-going-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.keep-going-options {
  display: flex;
  gap: var(--space-sm);
}

.keep-going-options .time-option {
  flex: 1;
}

/* ============================================
   Custom Time Input
   ============================================ */
.time-custom {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-md);
}

.time-custom-input {
  width: 100%;
  background: transparent;
  border: none;
  font-family: var(--font);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text);
  outline: none;
  padding: var(--space-md) 0;
  text-align: center;
  -moz-appearance: textfield;
}

.time-custom-input::-webkit-outer-spin-button,
.time-custom-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

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

.time-custom-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex-shrink: 0;
}

.time-custom-small {
  flex: 1;
}

.time-custom-small .time-custom-input {
  padding: var(--space-sm) 0;
}

/* ============================================
   Task Reminder Card
   ============================================ */
.task-reminder {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.task-reminder-name {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  margin-top: var(--space-xs);
}

.task-reminder-goal {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  margin-top: var(--space-xs);
}

.task-reminder-outcome {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* ============================================
   Microsteps (Stuck flow)
   ============================================ */
.microsteps-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.microstep-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.microstep-number {
  font-size: var(--text-xs);
  color: var(--text-muted);
  width: 20px;
  flex-shrink: 0;
}

.microstep-input {
  flex: 1;
}

.problem-summary {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: var(--text-sm);
}

.stuck-context {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.stuck-context-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.stuck-context-item + .stuck-context-item {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(0,0,0,0.1);
}

.stuck-context-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stuck-context-value {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.stuck-context-problem {
  font-style: italic;
}

/* ============================================
   Resume Card (Home screen)
   ============================================ */
.resume-card {
  border-left: 3px solid var(--text);
}

.resume-task-name {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-sm);
}

.resume-detail {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.resume-label {
  font-weight: var(--font-semibold);
}

/* ============================================
   Don't Tags (Timer context)
   ============================================ */
.task-donts {
  margin-top: var(--space-sm);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.dont-tag {
  display: inline-block;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ============================================
   Mise en Place List (Bored flow)
   ============================================ */
.mise-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mise-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  transition: opacity var(--transition);
}

.mise-item.checked {
  opacity: 0.6;
}

.mise-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.mise-checkbox.checked {
  background: var(--text);
  border-color: var(--text);
}

.mise-checkbox.checked::after {
  content: '✓';
  color: var(--bg);
  font-size: 14px;
  font-weight: bold;
}

.mise-input {
  flex: 1;
  transition: all var(--transition);
}

.mise-input.checked {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Mise list input style (step 1) */
.mise-item-input {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.mise-number {
  font-size: var(--text-xs);
  color: var(--text-muted);
  width: 20px;
  flex-shrink: 0;
}

/* Mise text (step 2 - kill phase) */
.mise-text {
  font-size: var(--text-sm);
  transition: all var(--transition);
}

.mise-text.checked {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ============================================
   Timer Microsteps (Stuck flow - interactive)
   ============================================ */
.timer-microsteps {
  margin-top: var(--space-md);
}

.timer-microsteps-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.timer-microstep {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  cursor: pointer;
  transition: opacity var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.timer-microstep.checked {
  opacity: 0.5;
}

.timer-microstep-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.timer-microstep-checkbox.checked {
  background: var(--text);
  border-color: var(--text);
}

.timer-microstep-checkbox.checked::after {
  content: '✓';
  color: var(--bg);
  font-size: 11px;
  font-weight: bold;
}

.timer-microstep-text {
  font-size: var(--text-xs);
  transition: all var(--transition);
}

.timer-microstep.checked .timer-microstep-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.timer-microstep-add {
  margin-top: var(--space-sm);
}

.timer-microstep-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--text-muted);
  font-family: var(--font);
  font-size: var(--text-xs);
  color: var(--text);
  padding: var(--space-sm) 0;
  outline: none;
  transition: border-color var(--transition);
}

.timer-microstep-input:focus {
  border-bottom-color: var(--text);
  border-bottom-style: solid;
}

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

/* ============================================
   Intro Screen
   ============================================ */
.intro-screen {
  text-align: center;
}

.intro-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
}

.intro-icon {
  font-size: 48px;
}

.intro-arrow {
  font-size: 32px;
  color: var(--text-muted);
}

/* ============================================
   Cash Out Screen (New)
   ============================================ */
.cashout-screen {
  text-align: center;
}

.cashout-content {
  width: 100%;
}

.cashout-plus {
  font-size: var(--text-3xl);
  font-weight: var(--font-black);
  line-height: 1;
}

.cashout-task {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.cashout-total {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.cashout-question {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
}

.cashout-buttons {
  display: flex;
  gap: var(--space-md);
}

.cashout-buttons .btn {
  flex: 1;
}

.cashout-progress {
  width: 100%;
}

.cashout-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}

.cashout-progress-fill {
  height: 100%;
  background: var(--text);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.cashout-progress-text {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
  text-align: center;
}

.cashout-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
}

.cashout-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.cashout-note {
  text-align: left;
}

/* Pending chests indicator on CashOut screen */
.cashout-chests {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.cashout-chests:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.cashout-chests-icon {
  font-size: 24px;
}

.cashout-chests-text {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text);
}

.xp-container {
  width: 100%;
}

.xp-bar {
  width: 100%;
  height: 12px;
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  background: var(--success);
  border-radius: 6px;
  transition: width 0.5s ease;
}

.xp-label {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-xs);
  margin-top: var(--space-sm);
}

.unlock-ready {
  text-align: center;
}

.unlock-ready-boxes {
  font-size: 48px;
  letter-spacing: 8px;
}

.unlock-ready-text {
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.cashout-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

.btn-glow {
  animation: btnGlow 2s ease-in-out infinite;
}

@keyframes btnGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.4); }
  50% { box-shadow: 0 0 20px 4px rgba(52, 199, 89, 0.4); }
}

.time-option-large {
  width: 100%;
  padding: var(--space-lg);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  background: var(--surface);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
}

.time-option-large:active {
  transform: scale(0.98);
  background: var(--disabled);
}

.time-select-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ============================================
   Unlock Screen
   ============================================ */
.unlock-screen {
  text-align: center;
}

.unlock-header {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--success);
}

.flip-container {
  perspective: 1000px;
  width: 100%;
  max-width: 300px;
  height: 350px;
  margin: 0 auto;
  cursor: pointer;
  position: relative;
}

.flip-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
  transition: transform 0.2s ease;
}

.flip-container:active .flip-icon {
  transform: rotate(180deg);
}

.flip-card {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-container.flipped .flip-card {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-back {
  transform: rotateY(180deg);
}

.unlock-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.unlock-info {
  text-align: center;
}

.unlock-title {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
}

.unlock-artist {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.unlock-drop {
  font-style: italic;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
  padding: 0 var(--space-md);
}

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

.story-link {
  display: block;
  margin-top: var(--space-md);
  background: none;
  border: none;
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  cursor: pointer;
  text-decoration: underline;
}

/* ============================================
   Story Modal
   ============================================ */
.story-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.story-modal.open {
  opacity: 1;
}

.story-modal-content {
  background: var(--bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-lg);
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.story-modal.open .story-modal-content {
  transform: translateY(0);
}

.story-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.story-modal-header h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
}

.story-modal-close {
  background: none;
  border: none;
  font-size: var(--text-lg);
  cursor: pointer;
  padding: var(--space-sm);
}

.story-modal-artist {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.story-modal-text {
  line-height: 1.8;
  font-size: var(--text-sm);
}

/* ============================================
   Museum Screen
   ============================================ */
.museum-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.museum-item {
  aspect-ratio: 1;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform var(--transition);
}

.museum-item:active {
  transform: scale(0.98);
}

.museum-item.locked {
  opacity: 0.5;
}

.museum-item-image {
  width: 100%;
  flex: 1;
  object-fit: cover;
}

.museum-item-locked {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.museum-item-name {
  padding: var(--space-sm);
  font-size: var(--text-xs);
  text-align: center;
  font-weight: var(--font-medium);
}

.museum-item.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.museum-detail {
  text-align: center;
}

.museum-drop {
  font-style: italic;
  font-weight: var(--font-medium);
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--text);
  text-align: center;
}

.museum-story {
  text-align: left;
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--text-muted);
}

.museum-pack {
  margin-bottom: var(--space-xl);
}

.museum-pack-title {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.museum-pack.unlocked .museum-pack-title {
  color: var(--text);
  font-size: var(--text-sm);
  text-transform: none;
  letter-spacing: normal;
}

.museum-pack-desc {
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  font-style: italic;
}

.museum-chest {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--chest-color) 0%, var(--chest-color-dark) 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform var(--transition);
  animation: chestPulse 2s ease-in-out infinite;
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

.museum-chest:active {
  transform: scale(0.95);
  animation: none;
}

.museum-chest-icon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.museum-chest-name {
  padding: var(--space-sm);
  font-size: var(--text-xs);
  text-align: center;
  font-weight: var(--font-medium);
  color: white;
}

@keyframes chestPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.5);
  }
}

.btn-small {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-xs);
}

/* ============================================
   Home Screen (New)
   ============================================ */
.home-screen {
  text-align: center;
}

.home-content {
  width: 100%;
}

.home-heading {
  font-size: var(--text-2xl);
  font-weight: var(--font-black);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.home-task-name {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  line-height: 1.3;
}

.home-subtitle {
  font-size: var(--text-md);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.home-progress {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.home-stats {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
}

.home-encouragement {
  font-size: var(--text-md);
  color: var(--text-muted);
}

.home-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.home-task-inline {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.home-note {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: left;
}

.home-note-icon {
  margin-right: var(--space-xs);
}

.home-unfinished-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.home-unfinished-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition);
}

.home-unfinished-item:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.home-unfinished-name {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.home-unfinished-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.btn-link {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: var(--text-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-sm);
  transition: opacity var(--transition);
}

.btn-link:active {
  opacity: 0.7;
}

.btn-link-muted {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: var(--text-xs);
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-sm);
  opacity: 0.6;
  transition: opacity var(--transition);
}

.btn-link-muted:active {
  opacity: 1;
}

.home-footer {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
}

/* ============================================
   History Screen
   ============================================ */
.history-screen {
  text-align: center;
}

.history-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
}

.history-divider {
  height: 1px;
  background: var(--surface);
}

.history-section-title {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.history-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
}

.history-stat {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.history-stat-sep {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Calendar */
.calendar {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.calendar-month {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-md);
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.calendar-header span {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
}

.calendar-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-xs);
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  border-radius: 4px;
  color: var(--text-muted);
}

.calendar-day.empty {
  background: transparent;
}

.calendar-day.none {
  background: var(--bg);
}

.calendar-day.low {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text);
}

.calendar-day.medium {
  background: rgba(0, 0, 0, 0.3);
  color: var(--bg);
}

.calendar-day.high {
  background: var(--text);
  color: var(--bg);
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--text);
}

/* Done List */
.history-empty {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.history-group {
  margin-bottom: var(--space-xl);
  text-align: left;
}

.history-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.history-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--surface);
}

.history-item:last-child {
  border-bottom: none;
}

.history-item-name {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.history-item-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.history-item-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
  margin-top: var(--space-sm);
}

/* ============================================
   Early Exit Screen
   ============================================ */
.earlyexit-screen {
  text-align: center;
}

.earlyexit-content {
  width: 100%;
}

.earlyexit-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
}

.earlyexit-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.earlyexit-time {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ============================================
   Commit Screen (How long?)
   ============================================ */
.commit-screen {
  text-align: center;
}

.commit-content {
  width: 100%;
}

.commit-heading {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
}

.commit-options {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.commit-option {
  flex: 1;
  max-width: 140px;
  padding: var(--space-lg) var(--space-md);
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all 0.3s ease;
}

.commit-option:hover {
  border-color: var(--text);
}

.commit-option.selected {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.commit-option-soft {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  font-weight: var(--font-normal);
}

.commit-option-soft:hover {
  border-color: var(--text);
  color: var(--text);
}

.commit-option-soft.selected {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.commit-option.expanding {
  max-width: 100%;
  flex: none;
  width: 100%;
  transform: scale(1.02);
}

.commit-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: opacity 0.2s ease;
}

.commit-custom-input {
  width: 80px;
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  font-weight: var(--font-medium);
  text-align: center;
  transition: var(--transition);
}

.commit-custom-input:focus {
  outline: none;
  border-color: var(--text);
}

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

.commit-custom-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ============================================
   Approach Screen (Same or switch?)
   ============================================ */
.approach-screen {
  text-align: center;
}

.approach-content {
  width: 100%;
}

.approach-task {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.approach-goal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.approach-goal-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.approach-goal-text {
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
}

.approach-goal-edit {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.approach-goal-edit:hover {
  color: var(--text);
}

.approach-goal-input {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
}

.approach-goal-input .textarea {
  width: 100%;
  text-align: center;
}

.approach-goal-input .btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-xs);
}

.approach-question {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
}

.approach-hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.approach-buttons {
  display: flex;
  gap: var(--space-md);
}

.approach-buttons .btn {
  flex: 1;
}

/* ============================================
   Unlock Chest Animation
   ============================================ */
.unlock-chest-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.unlock-chest {
  font-size: 100px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.unlock-chest.shaking {
  animation: shake 0.5s ease-in-out infinite;
}

.unlock-chest.opening {
  animation: pop 0.5s ease-out forwards;
}

@keyframes shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-5px) rotate(-3deg); }
  75% { transform: translateX(5px) rotate(3deg); }
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(0); opacity: 0; }
}

.unlock-chest-hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1000;
}

.confetti-piece {
  position: absolute;
  top: 40%;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg) scale(0);
    opacity: 0;
  }
}

.unlock-revealed {
  animation: fadeIn 0.5s ease-out;
}

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

/* ============================================
   Protocol Screen (The Protocol)
   ============================================ */
.protocol-screen {
  text-align: center;
}

/* Timer Bar (thin progress bar at top) */
.protocol-timer-bar {
  width: 100%;
  height: 3px;
  background: var(--surface);
  border-radius: 2px;
  overflow: hidden;
}

.protocol-timer-fill {
  height: 100%;
  background: var(--text-muted);
  border-radius: 2px;
  transition: width 1s linear;
}

/* Dump Phase */
.protocol-dump-content {
  width: 100%;
}

.protocol-dump-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text-muted);
  font-family: var(--font);
  font-size: var(--text-lg);
  color: var(--text);
  padding: var(--space-md) 0;
  outline: none;
  text-align: center;
  transition: border-color var(--transition);
}

.protocol-dump-input:focus {
  border-bottom-color: var(--text);
}

.protocol-dump-input::placeholder {
  color: var(--text-muted);
  animation: placeholderPulse 8s ease-in-out infinite;
}

.protocol-task-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  max-height: 300px;
  overflow-y: auto;
}

.protocol-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-md);
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.protocol-task-text {
  font-size: var(--text-sm);
  text-align: left;
  flex: 1;
}

.protocol-task-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-lg);
  cursor: pointer;
  padding: var(--space-xs);
  opacity: 0.5;
  transition: opacity var(--transition);
}

.protocol-task-remove:hover {
  opacity: 1;
}

.protocol-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-md);
}

/* Calibration Phase */
.protocol-calibration {
  text-align: center;
}

.protocol-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.protocol-calibration-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

.protocol-calibration-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xl) var(--space-lg);
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.protocol-calibration-card:hover {
  border-color: var(--text);
  transform: scale(1.02);
}

.protocol-calibration-card:active {
  transform: scale(0.98);
}

.protocol-calibration-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

.protocol-calibration-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Selection Phase (Stacked Cards) */
.protocol-selection {
  text-align: center;
}

.protocol-question {
  font-size: var(--text-lg);
  color: var(--text);
  font-weight: var(--font-semibold);
}

/* Card Stack Container */
.protocol-card-stack {
  position: relative;
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

/* Stacked cards behind */
.protocol-card-behind {
  position: absolute;
  width: 90%;
  max-width: 300px;
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg);
  border: 1px solid var(--surface);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.protocol-card-behind-1 {
  transform: scale3d(0.9, 0.9, 1) translate3d(0, 0, 0);
  opacity: 0.5;
  z-index: 1;
  will-change: transform, opacity;
}

.protocol-card-behind-2 {
  transform: scale3d(0.8, 0.8, 1) translate3d(0, 0, 0);
  opacity: 0.3;
  z-index: 0;
  will-change: transform, opacity;
}

/* Active swipe card */
.protocol-swipe-card {
  position: absolute;
  width: 90%;
  max-width: 300px;
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg);
  border: 1px solid var(--surface);
  border-radius: var(--radius-lg);
  cursor: grab;
  user-select: none;
  display: flex;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 10;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}

.protocol-swipe-card:active {
  cursor: grabbing;
}

.protocol-swipe-card.dragging {
  transition: none;
}

.protocol-swipe-card.drag-right {
  border-color: rgba(52, 199, 89, 0.4);
}

.protocol-swipe-card.drag-left {
  border-color: rgba(255, 59, 48, 0.4);
}

.protocol-swipe-text {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  line-height: 1.4;
  text-align: center;
}

/* Winner Screen — Card Transformation */
.protocol-winner {
  text-align: center;
}

.protocol-winner-card-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.protocol-winner-card {
  width: 90%;
  max-width: 320px;
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg);
  border: 1px solid var(--surface);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  animation: winnerCardAppear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes winnerCardAppear {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.protocol-winner-text {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  line-height: 1.3;
}

.protocol-winner-hint {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin-top: var(--space-xl);
}

.protocol-winner-buttons {
  animation: winnerButtonsAppear 0.4s ease 0.2s both;
}

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

/* Swipe Buttons */
.protocol-swipe-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  position: relative;
  z-index: 20;
}

.protocol-btn-no,
.protocol-btn-yes {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid;
  background: transparent;
  font-size: var(--text-xl);
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.protocol-btn-no {
  border-color: var(--color-scared);
  color: var(--color-scared);
}

.protocol-btn-no:active {
  background: var(--color-scared);
  color: white;
  transform: scale(0.95);
}

.protocol-btn-yes {
  border-color: var(--success);
  color: var(--success);
}

.protocol-btn-yes:active {
  background: var(--success);
  color: white;
  transform: scale(0.95);
}

/* ============================================
   ZEN PATH - Post-Timer Flow Styles
   ============================================ */

/* --------------------------------------------
   Acknowledge Screen
   -------------------------------------------- */
.acknowledge-screen {
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.acknowledge-content {
  width: 100%;
}

.acknowledge-time {
  font-size: var(--text-3xl);
  font-weight: var(--font-black);
  line-height: 1;
  margin-top: var(--space-xl);
}

.acknowledge-text {
  font-size: var(--text-lg);
  color: var(--text);
  font-weight: var(--font-medium);
}

.acknowledge-hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* --------------------------------------------
   Suggestion Screen
   -------------------------------------------- */
.suggestion-screen {
  text-align: center;
}

.suggestion-content {
  width: 100%;
}

.suggestion-count {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  line-height: 1.3;
}

.suggestion-text {
  font-size: var(--text-lg);
  color: var(--text);
  line-height: 1.4;
}

.suggestion-time {
  font-size: var(--text-3xl);
  font-weight: var(--font-black);
  line-height: 1;
}

.suggestion-actions {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

/* --------------------------------------------
   Break Timer Screen
   -------------------------------------------- */
.break-timer-screen {
  text-align: center;
}

.break-timer-content {
  width: 100%;
}

.break-timer-countdown {
  font-size: var(--text-3xl);
  font-weight: var(--font-black);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.break-timer-progress {
  width: 100%;
  max-width: 280px;
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto;
}

.break-timer-progress-bar {
  height: 100%;
  background: var(--text);
  border-radius: 4px;
  width: 0%;
  transition: width 1s linear;
}

.break-timer-text {
  font-size: var(--text-lg);
  color: var(--text-muted);
}

/* --------------------------------------------
   Post-Break Screen
   -------------------------------------------- */
.post-break-screen {
  text-align: center;
}

.post-break-content {
  width: 100%;
}

.post-break-welcome {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  line-height: 1.2;
}

.post-break-rest {
  font-size: var(--text-md);
  color: var(--text-muted);
}

.post-break-question {
  font-size: var(--text-lg);
  color: var(--text);
}

.post-break-actions {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

/* First session explanation text */
.unlock-explanation {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

/* ============================================
   Warmth Indicator (The Warmth system)
   ============================================ */

.warmth-indicator {
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.warmth-indicator:active {
  transform: scale(0.9);
}

.warmth-resting {
  color: var(--text-muted);
  opacity: 0.5;
}

.warmth-active {
  color: var(--text-muted);
  opacity: 0.8;
}

.warmth-rolling {
  color: var(--success);
  opacity: 1;
}

/* Home footer layout update */
.home-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.home-footer-links {
  display: flex;
  gap: var(--space-lg);
}

/* ============================================
   Timeline Page
   ============================================ */
.museum-timeline {
  text-align: center;
}

.timeline-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: var(--space-sm);
}

.timeline-btn:active {
  opacity: 0.7;
}

.header-title {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.timeline-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.timeline-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timeline-label {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.timeline-value {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

.timeline-divider {
  height: 1px;
  background: var(--surface);
  margin: 0 var(--space-lg);
}

.timeline-quote {
  color: var(--text-muted);
  font-style: italic;
  font-size: var(--text-sm);
}

/* Timeline Calendar (GitHub-style) */
.timeline-calendar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  max-width: 280px;
}

.calendar-day {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.calendar-day:hover {
  transform: scale(1.1);
}

.day-empty {
  background: var(--surface);
  opacity: 0.3;
}

.day-worked {
  background: var(--success);
}

.calendar-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Timeline Feed */
.timeline-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
  max-width: 320px;
}

.feed-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--surface);
}

.feed-date {
  font-size: 14px;
  color: var(--text-muted);
}

.feed-sessions {
  font-size: 14px;
  color: var(--text);
}

.feed-empty {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}
