/* Live room: grid + audio + question overlay.
   Dark monochrome. Squares stay dim. Fade-to-black is slow. */

.room-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1rem 6rem;
  color: #d0d0c8;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.room-header {
  border-bottom: 1px solid rgba(160, 160, 150, 0.18);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.room-back {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: rgba(160, 160, 150, 0.62);
  text-decoration: none;
  margin-bottom: 0.6rem;
}

.room-back:hover { color: rgba(208, 208, 200, 0.85); }

.room-title {
  font-size: 1.6rem;
  font-weight: 500;
  margin: 0 0 0.4rem;
  color: #e6e6dc;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

.room-when {
  font-size: 0.88rem;
  color: rgba(192, 192, 184, 0.7);
  margin: 0;
}

.room-meta {
  font-size: 0.78rem;
  color: rgba(160, 160, 150, 0.55);
  margin: 0.3rem 0 0;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.room-blurb {
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(192, 192, 184, 0.78);
  max-width: 60ch;
  margin: 0 0 1.5rem;
}

.room-rsvp {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.6rem;
}

.room-rsvp-btn,
.room-leave-btn {
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  color: rgba(208, 208, 200, 0.85);
  border: 1px solid rgba(160, 160, 150, 0.32);
  padding: 0.55rem 1.1rem;
  border-radius: 2px;
  cursor: pointer;
}

.room-rsvp-btn:hover,
.room-leave-btn:hover { border-color: rgba(208, 208, 200, 0.65); background: rgba(28, 28, 24, 0.6); }

.room-color-select {
  font-family: inherit;
  font-size: 0.82rem;
  background: rgba(15, 15, 13, 0.85);
  color: rgba(208, 208, 200, 0.78);
  border: 1px solid rgba(160, 160, 150, 0.22);
  padding: 0.45rem 0.6rem;
  border-radius: 2px;
}

.room-rsvp-msg,
.room-rsvp-hint {
  font-size: 0.82rem;
  color: rgba(192, 192, 184, 0.55);
  margin: 0.3rem 0 0;
  min-height: 1.2em;
}

.room-rsvp-msg[data-state="error"] { color: rgba(220, 160, 140, 0.85); }
.room-rsvp-msg[data-state="ok"] { color: rgba(160, 200, 170, 0.85); }

.room-clock {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: rgba(160, 160, 150, 0.55);
  margin-bottom: 0.8rem;
  text-transform: lowercase;
}

.room-grid-wrap {
  margin: 1.25rem 0;
  transition: opacity 1500ms ease-in-out, filter 1500ms ease-in-out;
}

.room-grid-wrap[data-faded="true"] {
  opacity: 0.05;
  filter: blur(2px);
  pointer-events: none;
}

.room-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.35rem;
}

@media (min-width: 700px)  { .room-grid { grid-template-columns: repeat(8, 1fr); } }
@media (min-width: 1000px) { .room-grid { grid-template-columns: repeat(10, 1fr); } }
@media (min-width: 1300px) { .room-grid { grid-template-columns: repeat(12, 1fr); } }

.room-square {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgba(16, 16, 14, 0.7);
  border: 1px solid rgba(160, 160, 150, 0.14);
  border-radius: 2px;
  padding: 0.3rem;
  font-size: 0.62rem;
  line-height: 1.25;
  color: rgba(192, 192, 184, 0.62);
  overflow: hidden;
  transition: opacity 600ms ease-out, border-color 600ms ease-out;
}

.room-square[data-empty="true"] {
  border-style: dashed;
  border-color: rgba(160, 160, 150, 0.08);
  background: transparent;
}

.room-square[data-self="true"] {
  border-color: rgba(208, 208, 200, 0.38);
}

.room-square[data-guest="true"] {
  border-style: dotted;
}

.room-square[data-color="ember"]   { background: rgba(60, 28, 18, 0.45); }
.room-square[data-color="moss"]    { background: rgba(22, 36, 26, 0.45); }
.room-square[data-color="cobalt"]  { background: rgba(18, 26, 50, 0.5); }
.room-square[data-color="bone"]    { background: rgba(46, 44, 38, 0.55); }
.room-square[data-color="rust"]    { background: rgba(54, 30, 20, 0.5); }

.room-square-answers {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
  white-space: normal;
}

.room-square-answer {
  display: block;
  padding-top: 0.18rem;
}

.room-square-answer:first-child { padding-top: 0; }

.room-question-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 4, 0.96);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 1.2rem;
  animation: room-fade-in 1500ms ease-in-out;
}

@keyframes room-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.room-question-inner {
  max-width: 620px;
  width: 100%;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: #e6e6dc;
}

.room-question-position {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(160, 160, 150, 0.5);
  margin: 0 0 0.7rem;
}

.room-question-prompt {
  font-size: 1.15rem;
  line-height: 1.55;
  margin: 0 0 1.3rem;
  letter-spacing: 0.01em;
}

.room-question-form {
  display: grid;
  gap: 0.7rem;
}

.room-question-input {
  font-family: inherit;
  font-size: 0.95rem;
  background: rgba(14, 14, 12, 0.85);
  color: #e6e6dc;
  border: 1px solid rgba(160, 160, 150, 0.25);
  padding: 0.75rem 0.85rem;
  resize: vertical;
  border-radius: 2px;
}

.room-question-input:focus {
  outline: none;
  border-color: rgba(208, 208, 200, 0.55);
}

.room-question-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.room-question-count,
.room-question-clock {
  font-size: 0.74rem;
  color: rgba(160, 160, 150, 0.55);
  letter-spacing: 0.06em;
}

.room-question-submit {
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  color: rgba(208, 208, 200, 0.92);
  border: 1px solid rgba(208, 208, 200, 0.5);
  padding: 0.55rem 1.4rem;
  border-radius: 2px;
  cursor: pointer;
}

.room-question-submit:hover { background: rgba(28, 28, 24, 0.6); }
.room-question-submit[disabled] { opacity: 0.4; cursor: not-allowed; }

.room-question-msg {
  font-size: 0.78rem;
  color: rgba(192, 192, 184, 0.6);
  margin: 0.4rem 0 0;
  min-height: 1.2em;
}

.room-question-msg[data-state="error"] { color: rgba(220, 160, 140, 0.85); }
.room-question-msg[data-state="ok"] { color: rgba(160, 200, 170, 0.85); }

.room-archive-note {
  font-size: 0.82rem;
  color: rgba(160, 160, 150, 0.65);
  margin: 0 0 1.2rem;
  font-style: italic;
}

.room-archive-questions {
  list-style: decimal-leading-zero;
  padding-left: 1.5rem;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.85rem;
  color: rgba(208, 208, 200, 0.85);
}

.room-archive-questions li {
  font-size: 0.9rem;
  line-height: 1.6;
  padding-left: 0.4rem;
}

.room-archive-questions .rq-prompt {
  display: block;
  margin-bottom: 0.25rem;
}

.room-archive-questions .rq-meta {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(160, 160, 150, 0.5);
}

.rq-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.5rem;
}

.rq-list li {
  padding: 0.7rem 0.85rem;
  background: rgba(20, 20, 18, 0.55);
  border: 1px solid rgba(160, 160, 150, 0.14);
  border-radius: 2px;
  font-size: 0.84rem;
  line-height: 1.55;
}

.rq-list .rq-pos {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(160, 160, 150, 0.55);
  display: block;
  margin-bottom: 0.3rem;
}

.rq-list .rq-marker {
  font-size: 0.72rem;
  color: rgba(160, 160, 150, 0.5);
  display: block;
  margin-top: 0.3rem;
}
