/* ==========================================================================
   VisionarySHQ - The Third Chair & Conflict Mode
   Modern, Calming, Mobile-First Responsive Stylesheet
   ========================================================================== */

:root {
  --bg-sand: #FAF7F2;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #F5F1EB;
  --bg-accent-light: #EBF3EE;
  
  --text-main: #1C2321;
  --text-muted: #5E6966;
  --text-faint: #8E9995;
  
  --brand-sage: #386641;
  --brand-sage-hover: #2B4F32;
  --brand-amber: #C67D2D;
  --brand-amber-light: #F7EFE3;
  --brand-amber-hover: #AF6A20;
  --brand-rose: #BC4749;
  --brand-rose-light: #FDF0F0;
  --brand-sky: #457B9D;
  --brand-sky-light: #F0F6F9;
  
  --border-light: rgba(28, 35, 33, 0.1);
  --border-focus: #386641;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  
  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-sand);
  color: var(--text-main);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   Container & Layout
   -------------------------------------------------------------------------- */
.tc-container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
  flex: 1;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.tc-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.95);
}

.tc-header-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.tc-logo-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #72A98B, var(--brand-sage));
  display: inline-block;
}

.tc-brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.tc-brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

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

/* Header button: Visually secondary so primary conversion is at the end of value */
.tc-header-pill {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tc-header-pill:hover {
  background: var(--bg-sand);
  color: var(--text-main);
  border-color: rgba(28, 35, 33, 0.2);
}

.tc-header-pill.is-unlocked {
  background: var(--bg-accent-light);
  color: var(--brand-sage);
  border-color: rgba(56, 102, 65, 0.3);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Onboarding: How The Third Chair Works
   -------------------------------------------------------------------------- */
.tc-intro-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.tc-how-it-works-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tc-how-it-works-list li {
  position: relative;
  padding-left: 28px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.45;
}

.tc-how-it-works-list li strong {
  color: var(--text-main);
}

.tc-how-it-works-list li::before {
  content: "✓";
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--brand-sage);
  font-weight: 700;
  font-size: 13px;
}

.tc-intro-note {
  background: var(--bg-sand);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.tc-intro-note strong {
  color: var(--brand-sage);
}

.tc-intro-reassurance {
  background: var(--bg-accent-light);
  border: 1px solid rgba(56, 102, 65, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  color: #2B4F32;
  line-height: 1.45;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Buttons & Pills
   -------------------------------------------------------------------------- */
.tc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  min-height: 48px;
}

.tc-btn-primary {
  background-color: var(--brand-sage);
  color: #FFFFFF;
}

.tc-btn-primary:hover {
  background-color: var(--brand-sage-hover);
  transform: translateY(-1px);
}

.tc-btn-secondary {
  background-color: var(--bg-card-subtle);
  color: var(--text-main);
  border-color: var(--border-light);
}

.tc-btn-secondary:hover {
  background-color: #EAE5DE;
}

.tc-btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
}

.tc-btn-ghost:hover {
  color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.04);
}

.tc-btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  min-height: 36px;
}

.tc-btn-full {
  width: 100%;
}

.tc-btn-gold {
  background-color: var(--brand-amber);
  color: #FFFFFF;
}

.tc-btn-gold:hover {
  background-color: var(--brand-amber-hover);
}

/* --------------------------------------------------------------------------
   Badges & Tags
   -------------------------------------------------------------------------- */
.tc-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.tc-badge-gold {
  background: var(--brand-amber-light);
  color: var(--brand-amber);
}

.tc-badge-success {
  background: var(--bg-accent-light);
  color: var(--brand-sage);
}

/* --------------------------------------------------------------------------
   Progress Tracker
   -------------------------------------------------------------------------- */
.tc-progress-container {
  margin: 16px 0 20px;
}

.tc-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.tc-progress-track {
  height: 6px;
  background-color: rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.tc-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #72A98B, var(--brand-sage));
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}

/* --------------------------------------------------------------------------
   Mode Selector Card
   -------------------------------------------------------------------------- */
.tc-mode-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.tc-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.tc-mode-pill {
  border: 1px solid var(--border-light);
  background: var(--bg-sand);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tc-mode-pill:hover {
  border-color: var(--brand-sage);
  background: #FFFFFF;
}

.tc-mode-pill.active {
  border-color: var(--brand-sage);
  background: var(--bg-accent-light);
  box-shadow: 0 0 0 1px var(--brand-sage);
}

.tc-mode-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
}

.tc-mode-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Step Cards & Panels
   -------------------------------------------------------------------------- */
.tc-step-panel {
  scroll-margin-top: 24px;
}

.tc-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 24px;
  animation: fadeIn 0.25s ease-out;
}

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

.tc-card-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  color: var(--text-main);
}

.tc-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* Form Elements */
.tc-form-group {
  margin-bottom: 18px;
}

.tc-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.tc-input, .tc-textarea, .tc-select {
  width: 100%;
  background: var(--bg-sand);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text-main);
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.tc-input:focus, .tc-textarea:focus, .tc-select:focus {
  outline: none;
  border-color: var(--border-focus);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(56, 102, 65, 0.12);
}

.tc-input-error {
  border-color: var(--brand-rose) !important;
  box-shadow: 0 0 0 3px rgba(188, 71, 73, 0.18) !important;
  background-color: var(--brand-rose-light) !important;
}

.tc-textarea {
  min-height: 100px;
  resize: vertical;
}

/* Silent Container Box */
.tc-silent-box {
  background: var(--bg-card-subtle);
  border-left: 4px solid var(--brand-sage);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.tc-silent-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-sage);
  margin-bottom: 4px;
}

.tc-silent-content {
  font-size: 15px;
  color: var(--text-main);
  white-space: pre-wrap;
}

/* --------------------------------------------------------------------------
   Persistent Token Presentation Card
   -------------------------------------------------------------------------- */
.tc-token-hero-card {
  background: linear-gradient(135deg, #FAF7F2, #F4EFE6);
  border: 2px solid rgba(56, 102, 65, 0.25);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.tc-token-display-box {
  background: #FFFFFF;
  border: 1px solid rgba(56, 102, 65, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin: 14px auto;
  max-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.tc-token-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--brand-sage);
}

/* --------------------------------------------------------------------------
   Integrated Tranquil Audio Player
   -------------------------------------------------------------------------- */
.tc-audio-card {
  background: var(--bg-card-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--border-light);
}

.tc-audio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tc-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-sage);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.tc-play-btn:hover {
  transform: scale(1.05);
}

.tc-audio-info {
  flex: 1;
}

.tc-audio-track {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  display: block;
}

.tc-audio-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.tc-scrubber {
  width: 100%;
  height: 4px;
  accent-color: var(--brand-sage);
  cursor: pointer;
}

.tc-audio-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.tc-audio-pill {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.tc-audio-pill.active {
  background: var(--brand-sage);
  color: #FFFFFF;
  border-color: var(--brand-sage);
}

/* --------------------------------------------------------------------------
   Sharing Grid
   -------------------------------------------------------------------------- */
.tc-share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   Visually Formatted Session Summary
   -------------------------------------------------------------------------- */
.tc-summary-deck {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 16px 0 20px;
}

.tc-summary-section {
  background: var(--bg-sand);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.tc-summary-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brand-sage);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tc-summary-row {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.tc-summary-row:last-child {
  margin-bottom: 0;
}

.tc-summary-row-label {
  font-weight: 600;
  color: var(--text-main);
  margin-right: 4px;
}

.tc-summary-row-val {
  color: var(--text-muted);
}

/* Partner Access Box in Summary */
.tc-partner-access-box {
  background: var(--bg-accent-light);
  border: 1px solid rgba(56, 102, 65, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   Card Actions (Back / Next Navigation)
   -------------------------------------------------------------------------- */
.tc-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* --------------------------------------------------------------------------
   Conflict Mode Contextual Banner (Strongest Invitation after Value)
   -------------------------------------------------------------------------- */
.tc-conflict-teaser {
  background: linear-gradient(135deg, #FFF9F0, #FDF4E7);
  border: 1.5px solid rgba(198, 125, 45, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin: 24px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: var(--shadow-sm);
}

.tc-conflict-teaser-content h4 {
  font-size: 16px;
  color: #8C5316;
  font-weight: 700;
  margin-bottom: 4px;
}

.tc-conflict-teaser-content p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Conflict Mode Journey Components (Settle -> Notice -> Separate -> Translate -> Choose)
   -------------------------------------------------------------------------- */

/* Stage Progress Bar inside Conflict Mode */
.cm-stage-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cm-stage-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  white-space: nowrap;
}

.cm-stage-pill.active {
  background: var(--brand-amber);
  color: #FFFFFF;
}

.cm-stage-pill.done {
  background: var(--bg-accent-light);
  color: var(--brand-sage);
}

/* Adaptive Activation Router Cards */
.cm-activation-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.cm-activation-card {
  background: var(--bg-sand);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.cm-activation-card:hover {
  border-color: var(--brand-amber);
  background: #FFFFFF;
  transform: translateY(-1px);
}

.cm-activation-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.cm-activation-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Settle: Extended-Exhale Breathing Pacer Sphere */
.cm-pacer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-card-subtle), #FFFFFF);
  border-radius: var(--radius-lg);
  margin: 16px 0;
  border: 1px solid var(--border-light);
}

.cm-pacer-sphere {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, #E8A857 0%, var(--brand-amber) 70%, #8C5316 100%);
  box-shadow: 0 0 24px rgba(198, 125, 45, 0.25);
  margin-bottom: 20px;
  transform: scale(0.85);
  transition: transform 0.1s linear;
}

.cm-pacer-sphere.inhale {
  animation: inhaleAnim 4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.cm-pacer-sphere.exhale {
  animation: exhaleAnim 6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes inhaleAnim {
  from { transform: scale(0.85); opacity: 0.85; }
  to { transform: scale(1.25); opacity: 1; }
}

@keyframes exhaleAnim {
  from { transform: scale(1.25); opacity: 1; }
  to { transform: scale(0.85); opacity: 0.85; }
}

.cm-pacer-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  min-height: 28px;
  margin-bottom: 4px;
}

.cm-pacer-counter {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Notice: 5-State Nervous System Check-In */
.cm-state-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.cm-state-card {
  background: var(--bg-sand);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.cm-state-card:hover {
  border-color: var(--brand-sage);
  background: #FFFFFF;
}

.cm-state-card.selected {
  border-color: var(--brand-amber);
  background: var(--brand-amber-light);
  box-shadow: 0 0 0 1px var(--brand-amber);
}

.cm-state-name {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-main);
  margin-bottom: 2px;
}

.cm-state-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

.cm-anchor-box {
  background: #FFFFFF;
  border-left: 4px solid var(--brand-amber);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 16px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.25s ease-out;
}

.cm-anchor-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-amber);
  margin-bottom: 4px;
}

.cm-anchor-text {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.5;
}

/* Translate: De-escalation Script Builder & Compassionate Guardrail Nudges */
.cm-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
}

.cm-chip {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cm-chip:hover {
  background: var(--bg-card-subtle);
  border-color: var(--brand-sage);
}

.cm-chip.active {
  background: var(--brand-sage);
  color: #FFFFFF;
  border-color: var(--brand-sage);
}

.cm-nudge-box {
  background: var(--brand-amber-light);
  border-left: 3px solid var(--brand-amber);
  padding: 10px 12px;
  font-size: 12.5px;
  color: #8C5316;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 6px;
  animation: fadeIn 0.2s ease-out;
  line-height: 1.45;
}

.cm-script-result-box {
  background: var(--bg-card-subtle);
  border: 1.5px solid rgba(56, 102, 65, 0.3);
  border-radius: var(--radius-md);
  padding: 18px;
  margin: 18px 0;
  animation: fadeIn 0.25s ease-out;
}

.cm-script-quote {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 14px;
}

/* Deeper Value Bridge Card */
.cm-value-bridge-card {
  background: var(--bg-sand);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
}

.cm-value-chip {
  display: inline-block;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.cm-value-chip:hover {
  border-color: var(--brand-sage);
  background: var(--bg-accent-light);
}

.cm-value-chip.selected {
  background: var(--brand-sage);
  color: #FFFFFF;
  border-color: var(--brand-sage);
  box-shadow: 0 2px 6px rgba(56, 102, 65, 0.2);
}

/* Pause Return Time Pills */
.cm-time-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.cm-time-pill {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: var(--bg-sand);
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cm-time-pill:hover {
  background: #FFFFFF;
  border-color: var(--brand-amber);
}

.cm-time-pill.selected {
  background: var(--brand-amber);
  color: #FFFFFF;
  border-color: var(--brand-amber);
}

/* Next Action Cards */
.cm-action-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 18px;
}

.cm-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-sand);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.cm-action-card:hover {
  background: #FFFFFF;
  border-color: var(--brand-sage);
  transform: translateY(-1px);
}

.cm-action-card.selected {
  background: var(--bg-accent-light);
  border-color: var(--brand-sage);
  color: #2B4F32;
  box-shadow: 0 0 0 1px var(--brand-sage);
}

.cm-action-rec-badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--brand-sage-light);
  color: var(--brand-sage);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: auto;
}

/* Saved Session Banner on App Entry */
.tc-saved-banner {
  background: #F4F7F5;
  border: 1.5px solid rgba(56, 102, 65, 0.35);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Consent Selection Cards */
.tc-consent-card {
  transition: all var(--transition-fast);
}

.tc-consent-card:hover {
  border-color: var(--brand-sage) !important;
  background: #FAFAF9 !important;
}

.tc-consent-card input[type="radio"]:checked + div > div:first-child {
  color: var(--brand-sage) !important;
}

/* Interactive Subpanels */
.cm-subpanel {
  animation: fadeIn 0.25s ease-out;
}

/* Session Options Menu & Items */
.cm-session-options-menu {
  animation: fadeIn 0.15s ease-out;
}

.cm-menu-item {
  transition: background var(--transition-fast), color var(--transition-fast);
}

.cm-menu-item:hover {
  background: var(--bg-accent-light) !important;
}

/* --------------------------------------------------------------------------
   Modals & Drawers
   -------------------------------------------------------------------------- */
.tc-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 25, 22, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tc-modal {
  background: var(--bg-card);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalScale 0.2s ease-out;
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.tc-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tc-modal-close:hover {
  background: var(--bg-sand);
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
#tc-toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.tc-toast {
  background: rgba(28, 35, 33, 0.94);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(12px);
  transition: all var(--transition-normal);
}

.tc-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.tc-toast-success {
  background: #2D5A43;
}

.tc-toast-warning {
  background: #8C5316;
}

.tc-toast-error {
  background: #9E2A2B;
}

/* --------------------------------------------------------------------------
   Analytics HUD (Local Testing Drawer)
   -------------------------------------------------------------------------- */
.hud-toggle-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: var(--text-main);
  color: #FFFFFF;
  border: none;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  z-index: 100;
  box-shadow: var(--shadow-md);
  opacity: 0.85;
}

.hud-toggle-btn:hover {
  opacity: 1;
}

.hud-drawer {
  position: fixed;
  bottom: 56px;
  right: 16px;
  width: 340px;
  max-height: 380px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow-y: auto;
  font-size: 12px;
}

.hud-drawer-title {
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
}

.hud-event-row {
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.hud-event-name {
  font-weight: 700;
  color: var(--brand-sage);
}

.hud-event-time {
  float: right;
  color: var(--text-faint);
}

.hud-event-meta {
  color: var(--text-muted);
  font-family: monospace;
  font-size: 11px;
  margin-top: 2px;
}

/* Utilities */
.hidden {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

/* Print Styles */
@media print {
  .tc-header, .tc-intro-card, .tc-audio-card, .tc-progress-container, .tc-mode-card, .tc-share-grid, .tc-conflict-teaser, .tc-card-actions, .hud-toggle-btn, .hud-drawer {
    display: none !important;
  }
  body {
    background: #FFFFFF;
  }
  .tc-container {
    max-width: 100%;
    padding: 0;
  }
  .tc-card {
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .tc-summary-section {
    border: 1px solid #CCC;
    page-break-inside: avoid;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 600px) {
  .tc-container {
    padding: 12px;
  }
  .tc-intro-card, .tc-card {
    padding: 18px 16px;
  }
  .tc-share-grid {
    grid-template-columns: 1fr;
  }
  .tc-mode-grid {
    grid-template-columns: 1fr;
  }
  .tc-conflict-teaser {
    flex-direction: column;
    align-items: flex-start;
  }
}
