/* Caregiver OS — Care Load Relay (extends board.css) */

.app-header {
  justify-content: space-between;
}

.app-header--in-room {
  padding-top: 10px;
  padding-bottom: 10px;
}

.app-header__brand {
  flex: 1;
  min-width: 0;
}

.app-header__context {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  margin: 4px 0 0;
  min-width: 0;
}

.app-header__sep {
  color: var(--whisper);
  opacity: 0.5;
  user-select: none;
}

.app-header__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.app-header__progress {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

body.header-in-room .screen__room.type-meta {
  display: none;
}

.validate-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-lg);
  max-width: 36ch;
  margin: 0 auto 12px;
  line-height: 1.45;
}

.screen__badge {
  display: inline-block;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cg-seafoam);
  border: 1px solid rgba(158, 196, 188, 0.35);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}

.deck-card--router {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
}

.deck-card--router .deck-card__felt {
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 6px;
}

.deck-card--router .deck-card__room {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin-bottom: 4px;
}

.deck-card__no-ai {
  display: block;
  margin-top: 8px;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cg-seafoam);
  opacity: 0.85;
}

.deck-card__icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.deck-card__body {
  flex: 1;
  min-width: 0;
}

.deck-card__hint,
.deck-card__route {
  font-size: var(--text-sm);
  opacity: 0.85;
  margin-top: 4px;
  line-height: 1.4;
  font-style: normal;
}

.deck-card__capacity {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 6px;
}

.room-capacity-slot {
  margin: 12px auto 4px;
  max-width: 420px;
}

.room-capacity {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(168, 191, 166, 0.15);
  background: rgba(18, 59, 58, 0.55);
  text-align: left;
}

.room-capacity__no-ai {
  margin: 6px 0 0;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cg-seafoam);
}

.receipt-no-ai {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--whisper);
  margin: 12px 0 0;
  letter-spacing: 0.04em;
}

.held-not-solved {
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  font-style: italic;
  line-height: 1.45;
  margin: 0 auto 20px;
  max-width: 24ch;
  animation: fade-up 0.7s ease both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Privacy banner — paid care worker */
.privacy-banner {
  max-width: 480px;
  margin: 20px auto 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(184, 121, 104, 0.35);
  background: rgba(184, 121, 104, 0.12);
}

.privacy-banner__text {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--cg-cream);
}

/* Mode switch */
.mode-switch {
  display: flex;
  gap: 8px;
  justify-content: center;
  max-width: 360px;
  margin: 0 auto 20px;
  padding: 4px;
  background: rgba(18, 59, 58, 0.5);
  border-radius: 999px;
  border: 1px solid rgba(246, 239, 228, 0.08);
}

.mode-switch__btn {
  flex: 1;
  padding: 11px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.mode-switch__btn.is-active {
  background: rgba(168, 191, 166, 0.2);
  color: var(--cream);
  outline: 1px solid rgba(168, 191, 166, 0.35);
}

.deck-grid--rides .deck-card--router {
  background: linear-gradient(160deg, #3a6a67 0%, var(--cg-teal-mid) 45%, #245552 100%);
}

/* Siren dimmer — urgency triage + care rail must-happen */
body[data-metaphor="care-rail"] .load-card:not(.load-card--bright),
body[data-metaphor="triage-table"] .load-card:not(.load-card--bright) {
  opacity: 0.35;
  filter: saturate(0.4);
  transition: opacity 0.6s ease, filter 0.6s ease;
}

body[data-metaphor="care-rail"] .load-card--bright,
body[data-metaphor="triage-table"] .load-card--bright {
  box-shadow: 0 0 20px var(--cg-gold-glow);
  border: 1px solid rgba(197, 163, 90, 0.35);
}

body[data-metaphor="admin-conveyor"] .container-zone[data-container="wait"] .load-card {
  opacity: 0.45;
  filter: saturate(0.5);
}

/* What Moved receipt */
.receipt-card {
  max-width: 480px;
  margin: 0 auto 20px;
  padding: 24px 22px;
  background: linear-gradient(165deg, var(--cg-cream) 0%, #ebe3d4 100%);
  color: #1e2726;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: receipt-in 0.7s ease both;
}

@keyframes receipt-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.receipt-card__label {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 8px;
}

.receipt-card__moved {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-style: italic;
  line-height: 1.35;
  margin: 0 0 20px;
}

.receipt-section {
  padding-top: 14px;
  border-top: 1px solid rgba(30, 39, 38, 0.12);
  margin-top: 14px;
}

.receipt-section__label {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 6px;
}

.receipt-section__text {
  font-size: var(--text-lg);
  line-height: 1.45;
  margin: 0;
}

.receipt-section__text--held {
  opacity: 0.85;
  font-size: var(--text-sm);
}

.receipt-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.card-output {
  max-width: 480px;
  margin: 0 auto 20px;
  padding: 18px 20px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--cg-cream);
  background: rgba(18, 59, 58, 0.65);
  border: 1px solid rgba(168, 191, 166, 0.25);
  border-radius: var(--radius);
}

/* Ride bridge */
.ride-bridge {
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
}

.ride-bridge__moved {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--cg-seafoam);
  margin: 16px 0;
}

/* Install card */
.install-card {
  max-width: 420px;
  margin: 0 auto 24px;
  padding: 20px;
  background: rgba(18, 59, 58, 0.5);
  border: 1px solid rgba(168, 191, 166, 0.25);
  border-radius: var(--radius);
  text-align: center;
}

.install-card__title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  margin: 0 0 8px;
}

.install-card__body {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

.install-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-footer__alt {
  margin-top: 8px;
  font-size: 0.6875rem;
}

.app-footer__alt a {
  color: var(--whisper);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Visual stages — Care Load Relay */
.visual-stage {
  margin: 16px auto 20px;
  max-width: 420px;
  min-height: 72px;
  border-radius: var(--radius);
  border: 1px solid rgba(168, 191, 166, 0.15);
  background: rgba(18, 59, 58, 0.4);
  position: relative;
  overflow: hidden;
}

.heart-container-visual {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.heart-container-visual::before {
  content: "♡";
  font-size: 2.5rem;
  color: var(--cg-clay);
  opacity: 0.7;
  transition: transform 0.8s ease, opacity 0.6s ease;
}

.heart-container--release::before {
  transform: scale(1.15);
  opacity: 1;
  color: var(--cg-moss);
}

.heart-container--release::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 18px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cg-gold), var(--cg-moss), transparent);
  animation: rail-slide 1s ease both;
}

@keyframes rail-slide {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 0.85; }
}

.lantern-vault-visual {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.lantern-vault-visual::before,
.lantern-vault-visual::after {
  content: "";
  width: 20px;
  height: 28px;
  border-radius: 4px 4px 8px 8px;
  background: rgba(197, 163, 90, 0.25);
  transition: background 0.6s ease, box-shadow 0.6s ease;
}

.lantern-vault--lighting::before,
.lantern-vault--lighting::after {
  background: var(--cg-gold);
  box-shadow: 0 0 16px var(--cg-gold-glow);
}

.handoff-bridge-visual {
  min-height: 80px;
}

.handoff-bridge-visual::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 28px;
  height: 4px;
  background: var(--cg-moss);
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.handoff-bridge--building::after {
  transform: scaleX(1);
  box-shadow: 0 0 20px rgba(168, 191, 166, 0.35);
}

.guilt-knot-visual {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guilt-knot-visual::before {
  content: "◎";
  font-size: 2rem;
  color: var(--cg-clay);
  transition: transform 0.8s ease, color 0.6s ease;
}

.guilt-knot--unfusing::before {
  transform: rotate(-12deg) scale(0.92);
  color: var(--cg-moss);
}

.layer-split-visual {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
}

.layer-split-visual::before {
  content: "";
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--cg-moss), var(--cg-seafoam), var(--cg-plum));
  opacity: 0.5;
  transition: opacity 0.6s ease;
}

.layer-split--revealing::before {
  opacity: 1;
  box-shadow: 0 0 16px rgba(168, 191, 166, 0.25);
}

.admin-conveyor-visual {
  min-height: 72px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-conveyor-visual::before,
.admin-conveyor-visual::after {
  content: "";
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(246, 239, 228, 0.35), rgba(168, 191, 166, 0.25));
}

.admin-conveyor--moving::before {
  animation: conveyor-tile 2.4s linear infinite;
}

@keyframes conveyor-tile {
  0% { transform: translateX(-8%); opacity: 0.5; }
  50% { opacity: 1; }
  100% { transform: translateX(8%); opacity: 0.5; }
}

.care-door-visual {
  min-height: 100px;
}

.care-door-visual::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 24, 23, 0.85));
  transform: translateY(100%);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.care-door--closing::after {
  transform: translateY(0);
}

.witness-bowl-visual {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.witness-bowl-visual::before {
  content: "";
  width: 64px;
  height: 32px;
  border-radius: 0 0 32px 32px;
  border: 2px solid rgba(154, 122, 138, 0.45);
  background: rgba(154, 122, 138, 0.12);
  transition: box-shadow 0.8s ease;
}

.witness-bowl--softening::before {
  box-shadow: 0 0 24px rgba(154, 122, 138, 0.25);
}

.rest-lock-visual {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rest-lock-visual::before {
  content: "SAFE ENOUGH";
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  padding: 10px 16px;
  border: 2px solid rgba(158, 196, 188, 0.4);
  border-radius: 999px;
  color: var(--cg-seafoam);
  opacity: 0.5;
  transition: opacity 0.6s ease, border-color 0.6s ease, transform 0.6s ease;
}

.rest-lock--sealing::before {
  opacity: 1;
  border-color: var(--cg-seafoam);
  transform: scale(0.95);
  box-shadow: 0 0 20px rgba(158, 196, 188, 0.25);
}

.return-archive-visual {
  min-height: 88px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px;
}

.return-archive-visual::before,
.return-archive-visual::after {
  content: "";
  border-radius: var(--radius-sm);
  background: rgba(246, 239, 228, 0.08);
  opacity: 0.35;
}

.return-door--opening {
  box-shadow: inset 0 0 40px rgba(168, 191, 166, 0.15);
}

.return-door--opening::before {
  opacity: 1;
  background: rgba(168, 191, 166, 0.2);
}

.airlock-build,
.capsule-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
  margin: 0 auto;
}

.reflect-fields {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reflect-field__label {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--cream);
  margin-bottom: 6px;
}

.reflect-field__input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: var(--text-sm);
  color: var(--cream);
  background: rgba(18, 59, 58, 0.6);
  border: 1px solid rgba(168, 191, 166, 0.2);
  border-radius: var(--radius-sm);
  resize: vertical;
}

.transform-count--revealing {
  animation: transform-count-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes transform-count-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.receipt-card--revealing {
  animation: receipt-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes receipt-rise {
  from { opacity: 0; transform: translateY(16px); filter: brightness(0.7); }
  to { opacity: 1; transform: translateY(0); filter: brightness(1); }
}

.close-hero--ceremony .close-hero__icon {
  animation: close-moon-rise 1.2s ease both;
}

@keyframes close-moon-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.container-zone--pulse {
  animation: container-pulse 0.9s ease both;
}

@keyframes container-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(158, 196, 188, 0); }
  50% { box-shadow: 0 0 24px rgba(158, 196, 188, 0.25); }
}

/* Card birth overlay */
.card-birth-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  overflow: hidden;
}

.card-birth__flyer {
  position: absolute;
  left: var(--ox);
  top: var(--oy);
  transform: translate(-50%, -50%);
  animation: card-leave-head 1s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i) * 70ms);
}

@keyframes card-leave-head {
  to {
    transform: translate(calc(-50% + var(--dx, 40px)), calc(-50% + var(--dy, -120px)));
    opacity: 0;
  }
}

.card-birth__flyer:nth-child(odd) { --dx: -60px; --dy: -140px; }
.card-birth__flyer:nth-child(even) { --dx: 90px; --dy: -100px; }

.mark-sentence {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 500;
  font-style: italic;
  color: var(--cg-seafoam);
  margin: 0 0 16px;
  line-height: 1.35;
}

.rest-boundary {
  max-width: 420px;
  margin: 16px auto;
  padding: 14px 16px;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--muted);
  border: 1px solid rgba(184, 121, 104, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(184, 121, 104, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .heart-container--release::after,
  .admin-conveyor--moving::before,
  .card-birth__flyer {
    animation: none !important;
  }
}

/* Arrive card readability cleanup */
.screen--arrive .deck-card__capacity,
.screen--arrive .capacity-meters,
.screen--arrive .capacity-meter {
  display: none !important;
}

.screen--arrive .deck-grid--rides .deck-card__body {
  gap: 0.5rem;
}

.screen--arrive .deck-grid--rides .deck-card__route {
  line-height: 1.5;
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}
