[hidden] {
  display: none !important;
}

.room-main {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto 28px;
  padding-top: 8px;
}

.room-main h1 {
  max-width: 16ch;
}

.lede {
  margin-top: 12px;
  max-width: 62ch;
  color: var(--muted);
}

.lobby {
  padding: 12px 0 8px;
}

.room-qr {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

.room-qr[hidden],
body.is-phone .room-qr {
  display: none;
}

.room-qr svg {
  flex: 0 0 auto;
  width: 132px;
  height: 132px;
  border-radius: 8px;
}

.room-qr figcaption {
  color: var(--muted);
}

.room-qr-url {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .room-qr {
    display: none;
  }
}

body.is-phone .topbar .nav,
body.is-phone .topbar .clock,
body.is-phone .foot nav,
body.is-phone #room-limits {
  display: none;
}

.phone-join {
  padding: 4px 0 24px;
}

.phone-form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  max-width: 28rem;
}

.phone-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.phone-form input {
  width: 100%;
  min-height: 56px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1.125rem;
}

.phone-join-button {
  width: 100%;
  min-height: 64px;
  font-size: 1.25rem;
}

.phone-join .privacy-note {
  font-size: 0.95rem;
}

.room-limits,
.wire-note,
.room-error {
  margin-top: 14px;
  max-width: 68ch;
}

.room-error {
  color: var(--copper);
  font-weight: 600;
}

.moderation {
  border: 2px solid var(--copper);
  background: var(--warn-bg);
  padding: 14px 16px;
  max-width: 68ch;
}

.moderation p {
  margin: 0;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.4;
}

.moderation .moderation-detail,
#moderation-detail {
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 600;
}

.moderation[data-level="blacklist"] {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.session.is-blocked .compose,
.session.is-blocked .controls,
.session.is-blocked .agenda-bar,
.session.is-blocked #prep ol,
.session.is-blocked #advance {
  opacity: 0.45;
}

.session {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.privacy-note {
  max-width: 68ch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 12px 14px;
}

.privacy-note h2 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.privacy-note p {
  margin: 0;
}

.link-row,
.controls,
.compose,
.join-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.compose {
  padding: 0 14px 12px;
}

.link-row label {
  flex: 1 1 240px;
  min-width: 0;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.link-row input,
.compose textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
}

.compose textarea {
  flex: 1 1 180px;
  resize: vertical;
  min-height: 44px;
  max-height: 160px;
}

.room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.stage-col,
.notes {
  min-width: 0;
}

.videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.person {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  min-width: 0;
}

.person video[data-kind="camera"]:not([data-live]) {
  display: none;
}

.person.is-voice,
.person.is-agent {
  min-height: 112px;
}

.agents {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.agents h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
}

.agent-row {
  display: grid;
  gap: 12px;
}

.person.is-agent {
  background: var(--agent-bg);
}

.person.is-speaking {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 2px var(--teal);
}

.speaking {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
}

.person figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.role {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 600;
}

.caption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin: 0;
  padding: 0 12px 12px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.caption-lang {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.room-stick {
  position: sticky;
  top: 8px;
  z-index: 4;
  display: grid;
  gap: 8px;
  padding-bottom: 8px;
  background: var(--soft);
}

.lang-pick {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 8px 0;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.92rem;
}

.lang-pick select {
  width: min(100%, 16rem);
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  padding: 8px 12px;
}

.person video,
.screen-stage video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1c1915;
  object-fit: cover;
}

.screen-stage video {
  object-fit: contain;
  border-radius: 18px;
}

.person figcaption,
.screen-stage p {
  padding: 8px 12px 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.screen-stage {
  margin-top: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.controls {
  margin-top: 12px;
}

.code-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-top: 16px;
}

.code-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.code-form input {
  width: 9.5rem;
  max-width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 12px;
}

.facilitator {
  display: grid;
  gap: 8px;
}

.objective {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--soft);
}

.objective h2 {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.objective p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.next-step {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.next-step p {
  margin: 0;
  overflow-wrap: anywhere;
}

#next-label {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

#next-text {
  font-size: 1.15rem;
}

#advance {
  justify-self: start;
  max-width: 100%;
  white-space: normal;
}

.drift {
  margin: 0;
  padding: 12px 14px;
  border: 2px solid var(--copper);
  border-radius: 12px;
  background: var(--warn-bg);
  font-weight: 600;
}

.prep {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.prep h2,
.output h2,
.notes h3 {
  font-family: var(--serif);
  font-weight: 500;
}

.prep h2,
.output h2 {
  font-size: 1.35rem;
}

.prep dl,
.brief dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.prep div,
.brief div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.prep dt,
.brief dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.prep dd,
.brief dd,
.prep li,
.brief li {
  margin: 0;
  overflow-wrap: anywhere;
}

.prep ol,
.brief ol,
.brief ul {
  margin: 0;
  padding-inline-start: 1.2rem;
}

.agenda-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.agenda-progress {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.prep li[aria-current="step"] {
  background: var(--live-bg);
  border-radius: 8px;
  font-weight: 600;
  padding: 4px 8px;
}

.prep ol button.step {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: start;
  padding: 0;
  cursor: pointer;
}

.suite {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#map-panel {
  grid-column: 1 / -1;
}

.map-view {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.map-view li {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

.map-view li span {
  display: inline-block;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  overflow-wrap: anywhere;
}

.map-view time {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.map-view li[aria-current="true"] span {
  background: var(--ink);
  color: var(--soft);
  border-color: var(--ink);
}

.map-view li:not(:last-child)::after {
  content: "";
  width: 16px;
  border-top: 2px solid var(--line);
  flex: 0 0 16px;
}

.suite-panel {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
}

.suite-panel h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
}

.suite-panel p {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

#diagram-view {
  overflow: auto;
  max-width: 100%;
}

#diagram-view svg {
  max-width: 100%;
  height: auto;
}

/* The diagram library's own style element is blocked by the CSP, so the room colors it. */
#diagram-view svg .node rect,
#diagram-view svg .node polygon,
#diagram-view svg .node circle,
#diagram-view svg .node ellipse,
#diagram-view svg .node path {
  fill: var(--mint);
  stroke: var(--teal);
  stroke-width: 1.2px;
}

#diagram-view svg .flowchart-link,
#diagram-view svg .edgePaths path {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.4px;
}

#diagram-view svg .arrowMarkerPath,
#diagram-view svg marker path,
#diagram-view svg marker circle {
  fill: var(--muted);
  stroke: var(--muted);
}

#diagram-view svg text {
  fill: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
}

#diagram-view svg .node .label text,
#diagram-view svg .edgeLabel text {
  text-anchor: middle;
}

#diagram-view svg .node .label rect {
  fill: none;
  stroke: none;
}

#diagram-view svg .edgeLabel rect,
#diagram-view svg .labelBkg {
  fill: var(--white);
  background: var(--white);
}

#diagram-view svg .cluster rect {
  fill: var(--soft);
  stroke: var(--line);
}

#board-frame {
  width: 100%;
  height: 220px;
  border: 0;
  border-radius: 12px;
  background: var(--agent-bg);
}

#record-view {
  display: grid;
  gap: 8px;
  margin: 0;
}

#record-view div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#record-view dt {
  color: var(--muted);
  font-size: 0.82rem;
}

#record-view dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.live-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  max-width: 100%;
}

.session-timer {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin: 0;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-variant-numeric: tabular-nums;
}

.session-timer time {
  font-weight: 600;
}

.demo-flag,
.sync-badge,
.feed-status {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.demo-flag,
.sync-badge {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.demo-flag {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-line);
}

.sync-badge {
  background: var(--live-bg);
  color: var(--teal);
}

.pad-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0 14px;
  max-width: 100%;
}

.pad-head h3 {
  padding: 0;
}

.feed-status {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--chip);
  color: var(--ink);
}

.feed-status[data-feed="live"] {
  background: var(--live-bg);
  color: var(--teal);
}

.feed-status[data-feed="demo"] {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.supervisor-banner {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 10px 14px;
  border: 1px solid var(--teal);
  border-radius: 14px;
  background: var(--live-bg);
  color: var(--teal);
  font-weight: 700;
}

.stage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 100%;
  min-width: 0;
}

.stage-list li {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}

.stage-list li[aria-current="step"] {
  border-color: var(--teal);
  background: var(--live-bg);
  color: var(--teal);
  font-weight: 700;
}

.read-only {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.caption-panel {
  max-width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
}

.caption-panel h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
}

.live-caption {
  margin: 0;
  overflow-wrap: anywhere;
}

#demo-toggle,
#download-pdf {
  max-width: 100%;
  white-space: normal;
}

.presence h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
}

.presence ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.presence li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.badge-muted,
.badge-share {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--chip);
}

.badge-share {
  background: var(--live-bg);
  color: var(--teal);
}

.pad-log {
  list-style: none;
  margin: 0;
  padding: 8px 14px;
  display: grid;
  gap: 8px;
  max-height: 12rem;
  overflow: auto;
}

.pad-log li {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pad-log .who {
  font-weight: 600;
}

.pad-log p {
  margin: 0;
  overflow-wrap: anywhere;
}

.pad-log [data-draft] {
  color: var(--muted);
}

.caption-log {
  list-style: none;
  margin: 0;
  padding: 0 12px 12px;
  max-height: 7.5rem;
  overflow: auto;
  display: grid;
  gap: 6px;
}

.caption-log li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.brief {
  padding: 0 14px 8px;
  display: grid;
  gap: 10px;
}

.notes h3 {
  font-size: 1.05rem;
  padding: 0 14px;
}

.notes .pad-head h3 {
  padding: 0;
}

.output {
  display: grid;
  gap: 8px;
}

.output textarea {
  width: 100%;
  min-height: 180px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
}

.controls button,
.link-row button,
.code-form button,
.lobby .button,
.join-row button,
#join,
#end,
#open,
#download,
#download-pdf,
#copy-brief,
#demo-toggle {
  min-height: 44px;
}

.notes {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  max-height: min(70dvh, 640px);
}

.notes h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  padding: 14px 14px 0;
}

.note-log {
  list-style: none;
  margin: 0;
  padding: 10px 14px;
  overflow: auto;
  flex: 1;
  display: grid;
  align-content: start;
  gap: 10px;
}

.note-log li {
  display: grid;
  gap: 2px;
}

.note-log time {
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.note-log p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note-log .who {
  font-weight: 600;
}

.controls button[disabled],
.join-row button[disabled],
#join[disabled],
#end[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 800px) {
  .room-main {
    width: min(var(--max), calc(100% - 32px));
  }

  .room-layout,
  .videos,
  .suite {
    grid-template-columns: 1fr;
  }

  .notes {
    min-height: 280px;
    max-height: none;
  }

  .link-row button,
  .join-row button,
  .code-form button,
  #join,
  #end,
  #open,
  .controls button {
    flex: 1 1 auto;
  }
}

@media (max-width: 420px) {
  .link-row,
  .controls,
  .code-form,
  .join-row,
  .compose,
  .agenda-bar {
    align-items: stretch;
  }

  .link-row button,
  .join-row button,
  .code-form button,
  #join,
  #end,
  #open,
  #download,
  #download-pdf,
  #copy-brief,
  #demo-toggle,
  .controls button,
  .compose button,
  .agenda-bar button {
    width: 100%;
  }
}

.phone-how {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

.phone-how h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.phone-how ol {
  margin: 8px 0 0;
  padding-inline-start: 1.25em;
  color: var(--muted);
}

.phone-how li + li {
  margin-top: 6px;
}

.mic-help {
  margin-top: 12px;
  max-width: 68ch;
  padding: 16px 18px;
  border: 2px solid var(--copper);
  border-radius: 16px;
  background: var(--white);
}

.mic-help[hidden] { display: none; }

.mic-help-title {
  margin: 0 0 8px;
  font-weight: 600;
}

.mic-help-steps {
  margin: 0 0 14px;
  padding-inline-start: 1.2em;
  line-height: 1.5;
}

.mic-help-steps li + li { margin-top: 6px; }

.mic-help .button { min-height: 48px; width: 100%; }

.mic-help-actions {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.mic-help-inapp,
#mic-help-inapp {
  margin: 0 0 10px;
}

.room-dock { display: none; }

.caption-dock {
  margin: 0;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.caption-dock[data-size="s"] { font-size: 0.875rem; }
.caption-dock[data-size="m"] { font-size: 1rem; }
.caption-dock[data-size="l"] { font-size: 1.25rem; }

.more-sheet { display: contents; }

.sample-note {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

.sheet-credit {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.sheet-credit a { color: var(--ink); }

/* ---------- Call bar: the few controls a caller needs, always in reach ---------- */
.call-bar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.call-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  text-align: center;
  gap: 1px;
  min-width: 48px;
  min-height: 48px;
  padding: 4px 10px;
  border: 1px solid var(--teal);
  border-radius: 999px;
  background: var(--white);
  color: var(--teal);
  font: 600 1rem/1.1 var(--sans);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.call-name,
.call-state {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-state {
  font-size: 0.8rem;
  font-weight: 600;
}

.call-btn[aria-pressed="true"]#bar-mic { background: var(--teal); color: var(--white); }
.call-btn.call-leave { border-color: var(--copper); color: var(--copper); }
.call-btn:disabled { opacity: 0.45; cursor: default; }

/* Pressed and keyboard focus. iOS Safari paints :active only after a touch
   listener exists; room.js also toggles .is-pressed on pointerdown. */
.call-btn:active,
.call-btn.is-pressed {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal-dark);
}

#bar-mic.call-btn:active,
#bar-mic.call-btn.is-pressed {
  background: var(--teal-dark);
  color: var(--white);
  border-color: var(--ink);
}

.call-btn.call-leave:active,
.call-btn.call-leave.is-pressed,
.call-btn.call-leave.is-leaving {
  background: var(--copper);
  color: var(--white);
  border-color: var(--danger-line);
}

.call-btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--white);
}

@media (prefers-reduced-motion: no-preference) {
  .call-btn:active,
  .call-btn.is-pressed {
    transform: scale(0.97);
  }
}

/* After leaving, every control is inactive in ink on soft, with a text label.
   Opacity is left at 1 so a faded teal control cannot look half-on. */
body.is-left #call-bar .call-btn,
body.is-left #call-bar .call-btn:disabled,
body.is-left #call-bar .call-btn:active,
body.is-left #call-bar .call-btn.is-pressed,
body.is-left #call-bar #bar-mic.call-btn[aria-pressed="true"] {
  opacity: 1;
  background: var(--soft);
  color: var(--ink);
  border: 2px solid var(--muted);
  box-shadow: none;
  transform: none;
  cursor: default;
}

.call-meta {
  margin: 0;
  margin-inline-start: auto;
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.call-meta #bar-count::before { content: "\1F464\00a0"; }

.left-room {
  display: grid;
  gap: 14px;
  justify-items: stretch;
  padding: 20px 16px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--white);
}

.left-room p {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.25;
}

.left-actions {
  display: grid;
  gap: 8px;
  width: 100%;
}

.left-room .left-rejoin {
  width: 100%;
  min-height: 56px;
  font-size: 1.125rem;
}

.left-room #left-close {
  width: 100%;
  min-height: 48px;
}

/* The call itself is one screen on a phone and on a laptop. The page does not scroll.
   Prompts stay on the stage. Privacy, the transcript, and the rest wait in More. */
html:has(body.in-call) {
  height: 100dvh;
  overflow: hidden;
}

body.in-call {
  height: 100dvh;
  overflow: hidden;
}

body.in-call .topbar,
body.in-call .foot,
body.in-call .skip,
body.in-call #room-limits,
body.in-call #session-badge { display: none; }

body.in-call .room-main {
  width: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body.in-call #session {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  overflow: hidden;
}

body.in-call .call-bar {
  position: relative;
  top: auto;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0 calc(-1 * max(12px, env(safe-area-inset-right))) 0 calc(-1 * max(12px, env(safe-area-inset-left)));
  padding: calc(6px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
  background: var(--soft);
}

body.in-call .call-btn { flex: 0 0 auto; min-width: 72px; }

body.in-call .call-meta {
  position: static;
  margin-inline-start: auto;
}

body.in-call #room-heading {
  margin: 8px 0 0;
  font-size: 1.35rem;
}

body.in-call #topic-heading {
  margin: 0;
  font-size: 1.25rem;
}

body.in-call #room-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
}

body.in-call .room-stick { position: static; padding: 0; }

/* Microphone help has to stay on the first screen. The sample pulse and
   the sample achievement row give that space back while the help is open. */
body.in-call:has(#mic-help:not([hidden])) #live-pulse,
body.in-call:has(#mic-help:not([hidden])) #achieve {
  display: none;
}

body.in-call .room-dock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}

body.in-call #ask { width: 100%; min-height: 48px; }

@media (min-width: 761px) {
  body.in-call #ask {
    align-self: flex-start;
    width: auto;
    min-width: 12rem;
    max-width: 22rem;
  }
}

body.in-call .person [data-caption],
body.in-call .person [data-caption-log] { display: none; }

body.in-call #more-sheet {
  display: none;
}

body.in-call.more-open #more-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 62%;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--white);
  border-top: 2px solid var(--ink);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}

.more-sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.more-sheet-bar h2 {
  margin: 0;
  font-size: 1.15rem;
}

#more-close { min-height: 48px; }

body.in-call #more-sheet select,
body.in-call #more-sheet .button,
body.in-call #more-sheet button { min-height: 48px; }

body.in-call #more-sheet input,
body.in-call #more-sheet select,
body.in-call #more-sheet textarea { max-width: 100%; }

/* The sheet scrolls. A capped notes box overflows onto the credit and swallows clicks. */
body.in-call .notes {
  max-height: none;
  min-height: 0;
}

body.in-call.is-left .room-dock,
body.in-call.is-left #presence,
body.in-call.is-left .room-stick,
body.in-call.is-left #supervisor-banner,
body.in-call.is-left #moderation,
body.in-call.is-left #mic-help,
body.in-call.is-left #room-error,
body.in-call.is-left #room-heading,
body.in-call.is-left #topic-heading,
body.in-call.is-left #agents,
body.in-call.is-left #screen-stage,
body.in-call.is-left #demo-flag,
body.in-call.is-left #live-bar {
  display: none !important;
}

body.in-call.is-left #room-status {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.in-call.is-left #left-room { margin-top: 12px; }

@media (max-width: 760px) {
  body.in-call .call-btn { flex: 1 1 0; min-width: 0; padding: 0 6px; font-size: 0.95rem; }
  body.in-call .presence h2 { margin: 0 0 6px; font-size: 0.85rem; }
  body.in-call .presence ul { display: flex; flex-wrap: wrap; gap: 6px; }
}

.host-panel {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.host-panel h2 {
  margin: 0;
  font-size: 1rem;
}

.host-say {
  margin: 8px 0;
}

.host-log {
  margin: 0 0 8px;
  padding-left: 1.1rem;
  max-height: 9rem;
  overflow: auto;
}

.host-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.host-form input {
  flex: 1 1 160px;
  min-width: 0;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 0 16px;
}

/* 360–375px: four labels share the row with the timer. Smaller type and a shorter
   sound label keep Mute, Sound, Leave, and More whole. */
@media (max-width: 400px) {
  body.in-call .call-bar { gap: 4px; }
  body.in-call .call-btn { padding: 0 1px; font-size: 0.8125rem; }
  body.in-call .call-meta { gap: 6px; font-size: 0.8125rem; }
}
