/* Screen 05 Room running and the mobile view M2.

   The border around the frame is not decoration but a safety measure: a disk
   draws anything inside, up to a copy of the diskroom interface with a password
   field, and the only thing telling one from the other is the platform chrome
   around it. That is why the stage has no fullscreen mode of its own: the frame
   cannot take the viewport. */

.run__ident {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.run__state {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  background: #2e2e2e;
  padding: 6px 10px;
  border-radius: var(--r-ui);
}

.run__title {
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run__disk {
  font-size: 14px;
  color: var(--muted);
}

.run__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted-2);
}

.run__stat {
  font-size: 12px;
  color: var(--muted-2);
}

.run {
  display: grid;
  grid-template-columns: 1fr 300px;
}

.run__main {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.stage__box--tall {
  height: 500px;
}

.run__note {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}

.run__hint {
  color: var(--muted-2);
  background: #2b2b2b;
  padding: 7px 11px;
  border-radius: var(--r-ui);
}

.run__hint--dim {
  background: transparent;
  color: var(--muted-3);
}

/* The fullscreen stage.

   What goes fullscreen is the platform container, not the frame, so the caption
   stays in view — and nothing else of the diskroom interface is left on screen,
   which is exactly where it matters most. The background is given an explicit
   colour: without it the browser paints a fullscreen element black and the
   stage's border is lost. */
.stage:fullscreen {
  background: var(--bg);
  padding: 10px 14px 14px;
  gap: 8px;
}

.stage:fullscreen .stage__label {
  font-size: 11px;
  color: var(--muted-2);
}

.stage:fullscreen .stage__box--tall {
  height: 100%;
  min-height: 0;
}

.run__side {
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.run__pane {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.run__pane:last-child {
  border-bottom: 0;
}

.run__pane--grow {
  flex: 1;
  min-height: 0;
}

.run__pane--console {
  padding-bottom: 12px;
}

/* A narrow column has no room for four seats in a row. */
.run__side .seats {
  grid-template-columns: repeat(2, 1fr);
}

/* ── chat ────────────────────────────────────────────────────────────────── */

.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.chat__lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #c4c4c4;
  overflow-y: auto;
  max-height: 200px;
  min-height: 60px;
}

.chat__line {
  word-break: break-word;
}

.chat__nick {
  color: var(--muted-2);
}

.field--chat {
  font-size: 14px;
  padding: 11px 13px;
  margin-top: auto;
}

.run__pane--console .console__body {
  height: 150px;
  padding: 0;
}

/* ── M2 Play mobile ──────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .run {
    grid-template-columns: 1fr;
  }

  .run__main {
    padding: 16px;
  }

  .run__side {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  /* The stage is smaller, but the border and the caption remain: without them
     a disk cannot be told from the platform interface, and on a phone that is
     the most dangerous. */
  .stage__box--tall {
    height: 300px;
  }

  .run__note {
    font-size: 12px;
  }
}

@media (max-width: 460px) {
  .run__ident {
    width: 100%;
  }

  .run__meta {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
}
