/* Calyndra XR — self-hosted calm room. No external fonts or CDN. */
.xr-page {
  margin: 0;
  min-height: 100vh;
  font-family: Segoe UI, system-ui, sans-serif;
  background: #0f1419;
  color: #e8eef7;
}

.xr-assent-card {
  max-width: 420px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #1a2332;
  border: 1px solid #31455f;
  border-radius: 16px;
  text-align: center;
}

.xr-mirror-card {
  max-width: 480px;
}

.xr-assent-caly {
  width: 120px;
  height: auto;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.xr-assent-copy {
  color: #9fb0c5;
  line-height: 1.5;
  font-size: 0.95rem;
}

.xr-supervise {
  color: #6ecbff;
  font-size: 0.9rem;
}

.xr-assent-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.xr-btn {
  display: inline-block;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 0;
  text-align: center;
}

.xr-btn.primary {
  background: #6ecbff;
  color: #062033;
}

.xr-btn.secondary {
  background: transparent;
  color: #6ecbff;
  border: 1px solid #31455f;
  margin-top: 0.5rem;
}

.xr-btn.link {
  background: transparent;
  color: #9fb0c5;
  font-weight: 500;
}

.xr-disclaimer {
  font-size: 0.75rem;
  color: #6b8a9a;
  margin-top: 1rem;
}

.xr-mirror-status {
  background: #243247;
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
  min-height: 3rem;
}

#xr-room {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0a1218;
}

#xr-room.hidden {
  display: none;
}

#xr-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.xr-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  box-sizing: border-box;
}

.xr-overlay-top {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: auto;
}

#xr-caly {
  width: 100px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

#xr-timer {
  background: rgba(26, 35, 50, 0.85);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #6ecbff;
}

.xr-overlay-bottom {
  display: flex;
  gap: 0.75rem;
  pointer-events: auto;
  flex-wrap: wrap;
  justify-content: center;
}

.xr-overlay-bottom .xr-btn {
  pointer-events: auto;
}

.xr-clip-video {
  position: absolute;
  bottom: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(90vw, 480px);
  border-radius: 12px;
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.xr-clip-video.hidden {
  display: none;
}

.therapy-chip-xr {
  background: #1f3d4a;
  border-color: #6ecbff;
}

.sensory-xr-link {
  margin-top: 0.75rem;
}

.xr-routine-strip {
  pointer-events: auto;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.xr-routine-label,
.xr-breath-label {
  font-size: 0.75rem;
  color: rgba(232, 238, 247, 0.85);
  text-align: center;
  margin: 0 0 0.35rem;
}

.xr-routine-cards {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.xr-routine-card {
  background: rgba(26, 35, 50, 0.88);
  border: 1px solid #31455f;
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
  color: #e8eef7;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
}

.xr-routine-card img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.xr-routine-card.done {
  border-color: #6ecbff;
  opacity: 0.85;
}

.xr-routine-num {
  font-size: 0.65rem;
  color: #6ecbff;
}

.xr-breathing {
  pointer-events: auto;
  text-align: center;
  margin: 0.35rem 0;
}

.xr-breathing.hidden {
  display: none;
}

.xr-breath-steps {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  flex-wrap: wrap;
}

.xr-breath-step {
  background: rgba(26, 35, 50, 0.88);
  border: 1px solid #31455f;
  border-radius: 8px;
  color: #e8eef7;
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.xr-breath-step.active {
  border-color: #6ecbff;
  color: #6ecbff;
}

@media (prefers-reduced-motion: reduce) {
  #xr-caly {
    animation: none;
  }
}
