/* Chamber — one room, one thought, one clock */

.chamber {
  min-height: 100dvh;
}

.chamber-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.chamber-app .site-bar {
  flex-shrink: 0;
}

.chamber-room {
  position: relative;
  flex: 1;
  min-height: calc(100dvh - 4.5rem);
  isolation: isolate;
  overflow: hidden;
}

.obs-void {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.28;
  filter: blur(5px) saturate(0.7);
  pointer-events: none;
}

.obs-void canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.claim-words {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.claim-word {
  position: absolute;
  max-width: 14rem;
  margin: 0;
  font-size: clamp(0.7rem, 1.4vw, 0.92rem);
  letter-spacing: 0.04em;
  color: rgba(180, 200, 220, 0.22);
  line-height: 1.35;
  transform: translate(-50%, -50%);
  text-wrap: pretty;
}

.claim-word.is-revised {
  color: rgba(255, 85, 0, 0.28);
}

.claim-word.is-rejected {
  color: rgba(160, 168, 180, 0.14);
  text-decoration: line-through;
}

.chamber-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100dvh - 4.5rem);
  padding: 2.5rem 1.35rem 7.5rem;
  max-width: 44rem;
  box-sizing: border-box;
}

.chamber-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -6%;
  top: 12%;
  bottom: 16%;
  width: min(100%, 40rem);
  background: radial-gradient(
    ellipse 70% 65% at 25% 45%,
    rgba(5, 5, 10, 0.74) 0%,
    rgba(5, 5, 10, 0.32) 48%,
    transparent 74%
  );
  pointer-events: none;
}

.obs-label {
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.6rem;
  font-weight: 500;
}

.obs-latest {
  margin: 0;
  font-size: clamp(1.65rem, 3.3vw, 2.5rem);
  font-weight: 370;
  line-height: 1.5;
  letter-spacing: -0.015em;
  color: #f5f7fb;
  max-width: min(38ch, 94%);
  text-wrap: pretty;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.obs-latest.is-empty {
  color: #c5cddb;
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  font-weight: 350;
}

.obs-latest.typing::after {
  content: "▍";
  display: inline-block;
  margin-left: 3px;
  color: var(--ember);
  animation: caretBlink 1s step-end infinite;
  opacity: 0.5;
  font-weight: 300;
}

@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}

.obs-latest.fade-in {
  animation: thoughtIn 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes thoughtIn {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.chamber-mood {
  margin: 1.25rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.ritual {
  margin-top: 2.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.1rem 2rem;
}

.obs-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
}

.obs-clock-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.obs-clock-time {
  font-family: var(--mono);
  font-size: clamp(1.85rem, 5vw, 2.7rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1.05;
}

.ritual-act {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-bottom: 0.2rem;
}

.wake-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.2rem 0;
  margin: 0;
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--ember);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  text-decoration-color: rgba(255, 85, 0, 0.55);
}

.wake-btn:hover {
  color: #ff7a33;
  text-decoration-color: #ff5500;
}

.wake-btn:disabled {
  cursor: default;
  color: var(--muted);
  text-decoration-color: rgba(180, 188, 200, 0.25);
}

.ritual-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  min-height: 0;
}

.share-whisper {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 2.2rem 0 0;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
}

.share-whisper:hover {
  color: var(--text);
}

.chamber-stage.energy-flash .obs-latest {
  animation: thoughtIn 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

body.chamber.is-thinking .obs-clock-time {
  color: var(--ember);
  animation: thinkPulse 1.8s ease-in-out infinite;
}

@keyframes thinkPulse {
  50% {
    opacity: 0.55;
  }
}

.toast-host {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  width: min(22rem, calc(100vw - 2rem));
  padding: 0.8rem 0.95rem;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}

.toast.show {
  opacity: 1;
  transform: none;
}

.toast strong {
  display: block;
  margin-bottom: 0.2rem;
}

.toast p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.toast-link {
  display: inline-block;
  margin-top: 0.45rem;
  color: var(--accent);
}

@media (max-width: 640px) {
  .chamber-stage {
    padding: 1.6rem 0.95rem 8.5rem;
  }

  .ritual {
    position: sticky;
    bottom: 0.75rem;
    margin-top: 2rem;
    padding: 0.85rem 0 0.15rem;
    background: linear-gradient(180deg, transparent, rgba(5, 5, 8, 0.88) 28%);
  }
}
