:root {
  --ink: #202820;
  --ink-soft: #58665a;
  --muted: #7d8a7f;
  --line: #dbe2d9;
  --paper: #f4f6f2;
  --surface: #fbfcf9;
  --green: #2d6b4f;
  --green-deep: #1f513b;
  --green-soft: #dcebe0;
  --blue: #356e8e;
  --amber: #b37a32;
  --danger: #a13f3d;
  --shadow: 0 18px 50px rgba(31, 54, 37, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 92% 2%, rgba(207, 225, 211, 0.7), transparent 28rem),
    linear-gradient(180deg, #f6f8f4 0%, #eff3ee 100%);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(53, 110, 142, 0.38);
  outline-offset: 2px;
}

.shell {
  width: min(1240px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  border-bottom: 1px solid rgba(121, 140, 124, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border: 2px solid var(--green);
  border-radius: 7px;
  position: relative;
  transform: rotate(-7deg);
}

.brand-mark::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 3px;
  position: absolute;
  inset: 5px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.identity-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 7px;
  border: 1px solid #cad6cc;
  border-radius: 3px;
  color: var(--ink-soft);
  font-size: 10px;
}

.identity-badge[data-role="host"] {
  border-color: #b8d1be;
  background: #eef6ed;
  color: var(--green);
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(251, 252, 249, 0.75);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.icon-button svg,
.primary-button svg,
.round-control svg,
.copy-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#copyScreenStatsButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#copyScreenStatsButton svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#screenStatsButton {
  min-width: 92px;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.connection-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aab5ab;
  flex: none;
}

.connection-status[data-state="connected"] {
  color: var(--green);
}

.connection-status[data-state="connected"]::before {
  background: #4a9669;
  box-shadow: 0 0 0 4px rgba(74, 150, 105, 0.12);
}

.connection-status[data-state="error"] {
  color: var(--danger);
}

.connection-status[data-state="error"]::before {
  background: var(--danger);
}

main {
  flex: 1;
}

.lobby {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: clamp(48px, 9vw, 120px);
  align-items: center;
  padding: clamp(60px, 10vh, 120px) 0 80px;
}

.intro {
  min-width: 0;
}

.intro h1,
.intro-copy,
.capability-row {
  width: 100%;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.intro h1 {
  max-width: 720px;
  margin: 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.intro h1 .title-line {
  display: inline-block;
  white-space: normal;
}

.intro-copy {
  max-width: 560px;
  margin: 28px 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.capability-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  color: var(--ink-soft);
  font-size: 13px;
}

.capability-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-green {
  background: #4e936c;
}

.dot-blue {
  background: #5c8fb0;
}

.dot-amber {
  background: #c69451;
}

.join-card {
  min-width: 0;
  width: 100%;
  background: rgba(251, 252, 249, 0.93);
  border: 1px solid rgba(192, 205, 192, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.join-card-heading,
.meeting-title-row,
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.join-card h2,
.help-dialog h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.user-login-panel {
  display: grid;
  gap: 11px;
  margin-bottom: 16px;
}

.user-login-panel .form-note {
  margin: -4px 0 2px;
}

.login-submit {
  width: 100%;
}

.user-session-panel {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
  padding: 9px 10px;
  border: 1px solid #d6e5d7;
  background: #f1f7ef;
  color: var(--green-deep);
  font-size: 13px;
}

.my-recordings {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #dbe5d9;
  background: #f8faf6;
}

.my-recordings-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.my-recording-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 10px;
  font-size: 11px;
}

.my-recording-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-recording-row span {
  color: var(--muted);
}

.my-recording-row button {
  grid-row: span 2;
  min-height: 29px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--green);
}

.room-badge {
  max-width: 150px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  font-size: 13px;
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
}

.field input::placeholder {
  color: #a7b0a8;
}

.field input:focus {
  border-color: var(--green);
}

.input-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 7px;
}

.field-action {
  min-width: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.field-action:hover {
  border-color: var(--green);
  color: var(--green);
}

.field-action svg,
.screen-tool svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding: 15px 0;
  border-top: 1px solid #e7ece5;
  border-bottom: 1px solid #e7ece5;
}

.toggle-row > div {
  display: grid;
  gap: 5px;
}

.toggle-title {
  font-size: 13px;
  font-weight: 700;
}

.toggle-note {
  color: var(--muted);
  font-size: 11px;
}

.switch {
  flex: none;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.slider {
  display: block;
  width: 42px;
  height: 24px;
  border-radius: 20px;
  background: var(--green);
  position: relative;
  transition: background 160ms ease;
}

.slider::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 3px;
  left: 21px;
  transition: left 160ms ease;
}

.switch input:not(:checked) + .slider {
  background: #bdc8bd;
}

.switch input:not(:checked) + .slider::after {
  left: 3px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  width: 100%;
  margin-top: 24px;
  padding: 0 16px;
  border: 1px solid var(--green-deep);
  background: var(--green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-button:hover {
  background: var(--green-deep);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.primary-button svg {
  width: 17px;
}

.secondary-button {
  width: 100%;
  margin-top: 24px;
  border: 1px solid var(--line);
  background: #fff;
}

.form-note,
.form-error {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.recent-meetings {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d9e4da;
  border-radius: 6px;
  background: #f7faf5;
}

.recent-meetings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.recent-meetings-list {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.recent-meeting {
  min-width: 142px;
  max-width: 210px;
  flex: 0 0 160px;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #d4e1d5;
  border-radius: 5px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.recent-meeting:hover,
.recent-meeting:focus-visible {
  border-color: var(--green);
  background: #f1f8f0;
}

.recent-meeting strong,
.recent-meeting span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-meeting strong {
  font-size: 13px;
}

.recent-meeting span {
  color: var(--muted);
  font-size: 11px;
}

.recent-meetings .form-note {
  margin: 0;
  font-size: 11px;
}

.meeting-preview {
  display: grid;
  gap: 7px;
  margin: 2px 0 4px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid #8da696;
  border-radius: 5px;
  background: #fbfcf9;
}

.meeting-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meeting-preview-head > span:first-child {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-preview-state {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.meeting-preview-state[data-state="scheduled"] {
  color: #8a5a10;
}

.meeting-preview-state[data-state="closed"] {
  color: #a34c36;
}

.meeting-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.form-note {
  overflow-wrap: anywhere;
}

.invite-preview {
  margin-top: 14px;
  padding: 10px 11px;
  border: 1px solid #e0e8de;
  border-radius: 5px;
  background: #f5f8f3;
}

.invite-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.invite-preview code {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-button {
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.form-error {
  color: var(--danger);
}

.form-error:empty {
  display: none;
}

.meeting {
  position: relative;
  padding: 34px 0 24px;
}

.meeting-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.meeting-header .section-kicker {
  margin-bottom: 7px;
}

.meeting-title-row {
  align-items: center;
  justify-content: flex-start;
}

.meeting-title-row h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
}

.copy-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
}

.copy-button svg {
  width: 14px;
  height: 14px;
}

.participant-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4a9669;
}

.stage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  min-height: min(59vh, 680px);
}

.screen-stage,
.people-panel {
  border: 1px solid var(--line);
  background: rgba(251, 252, 249, 0.82);
}

.screen-stage {
  min-width: 0;
  min-height: 420px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #e7ece5;
}

.stage-empty {
  max-width: 380px;
  padding: 34px;
  text-align: center;
}

.stage-symbol {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border: 1px solid #c7d3c8;
  border-radius: 6px;
  background: #f7faf5;
  display: grid;
  place-items: center;
  color: var(--green);
}

.stage-symbol svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stage-empty h2 {
  margin: 0 0 9px;
  font-size: 19px;
}

.stage-empty p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.screen-focus {
  width: 100%;
  height: 100%;
  min-height: 420px;
  position: relative;
  background: #17221b;
  display: flex;
  flex-direction: column;
  position: relative;
}

.screen-focus[hidden] {
  display: none;
}

.screen-media {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.screen-media[hidden] {
  display: none;
}

.screen-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.screen-media[data-fill="true"] video {
  object-fit: cover;
}

.screen-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.screen-label,
.screen-tool {
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 4px;
  background: rgba(17, 28, 20, 0.76);
  color: #f4f8f4;
  font-size: 12px;
}

.screen-label {
  min-width: 0;
  max-width: min(65%, 520px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-tools {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
}

.screen-quality {
  width: 76px;
  height: 44px;
  flex: none;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: #17221b;
  color: #fff;
  font-size: 13px;
  pointer-events: auto;
}

.screen-tool {
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  pointer-events: auto;
  white-space: nowrap;
}

.screen-tool:hover,
.screen-tool[data-active="true"] {
  background: rgba(17, 28, 20, 0.92);
}

.screen-tool[data-active="true"] {
  color: #ffe28a;
}

.annotation-canvas,
.laser-canvas {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  touch-action: none;
}

.annotation-canvas.enabled {
  pointer-events: auto;
  cursor: crosshair;
}

.laser-canvas {
  z-index: 4;
}

.annotation-canvas[data-tool="laser"] {
  cursor: none;
}

.annotation-canvas[data-tool="text"] {
  cursor: text;
}

.annotation-tools {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 6px;
  max-width: 660px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(17, 28, 20, 0.9);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.24);
  color: #f4f8f4;
}

.screen-focus.annotation-pinned .annotation-tools {
  position: relative;
  flex: none;
  inset: auto;
  width: 100%;
  max-width: none;
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
  background: #17221b;
}

.desktop-native .screen-focus.annotation-pinned .annotation-tools { display: none; }

.annotation-modes,
.annotation-settings {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.annotation-modes {
  grid-column: 1 / -1;
}

.annotation-settings {
  grid-column: 1;
  grid-row: 2;
}

.annotation-modes > *,
.annotation-settings > * {
  flex: none;
}

#annotationCloseButton {
  grid-column: 2;
  grid-row: 2;
}

.annotation-colors {
  display: flex;
  gap: 2px;
}

.annotation-color-picker {
  display: none;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.color-swatch {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.color-swatch::before {
  content: "";
  width: 21px;
  height: 21px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: var(--swatch);
}

.color-swatch[data-active="true"]::before {
  border-color: white;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.brush-size {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 44px;
}

.brush-size svg,
.annotation-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brush-size input {
  width: 64px;
  min-height: 44px;
  padding: 0;
  accent-color: #ffe28a;
}

.annotation-action,
.annotation-tool-mode {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: transparent;
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.annotation-tool-mode svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.annotation-tool-mode[data-active="true"] {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
}

.annotation-action:hover,
.annotation-tool-mode:hover,
.color-swatch:hover {
  background: rgba(255, 255, 255, 0.12);
}

.annotation-action:disabled {
  opacity: 0.45;
  cursor: wait;
}

.annotation-font-size input {
  width: 70px;
  min-height: 44px;
  padding: 4px;
  color: white;
  background: transparent;
}

.annotation-text-editor {
  position: absolute;
  z-index: 12;
  width: min(300px, calc(100% - 24px));
  padding: 10px;
  border: 1px solid #a9b9af;
  border-radius: 6px;
  background: #fff;
  color: #17221b;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.24);
}

.annotation-text-editor label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.annotation-text-editor textarea {
  width: 100%;
  min-height: 88px;
  max-height: 140px;
  resize: vertical;
  padding: 8px;
  font: inherit;
  font-size: 16px;
}

.annotation-text-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.annotation-text-actions > span {
  flex: 1;
  min-width: 0;
  color: #b02f31;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.annotation-text-actions .annotation-action {
  flex: none;
  border-color: #c6d1ca;
  color: #17221b;
}

.annotation-text-actions .annotation-action:hover {
  background: #edf3ef;
}

.screen-stage:fullscreen,
.screen-focus:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: #111914;
}

.screen-focus:fullscreen {
  display: flex;
}

.screen-focus:fullscreen .screen-media {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
}

.screen-focus:fullscreen .screen-media video {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.screen-focus:fullscreen .screen-media[data-fill="true"] video {
  object-fit: cover;
}

.screen-focus.annotation-pinned:fullscreen .screen-media {
  flex: 1;
  height: auto;
  min-height: 0;
}

.screen-focus.annotation-pinned:fullscreen .screen-media video {
  height: 100%;
  max-height: 100%;
}

.participant-video {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.participant-video video {
  object-fit: contain;
}

.notice-bar {
  min-height: 36px;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid #d8e2d7;
  border-radius: 4px;
  background: #edf3eb;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.notice-bar[data-kind="success"] {
  border-color: #bed6c5;
  background: #e4f0e6;
  color: var(--green-deep);
}

.notice-bar[data-kind="error"] {
  border-color: #e3c4c1;
  background: #fbefee;
  color: var(--danger);
}

.people-panel {
  border-radius: 6px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.people-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5ebe3;
}

.people-heading h2 {
  margin: 0;
  font-size: 14px;
}

.people-heading span {
  color: var(--muted);
  font-size: 11px;
}

.people-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.person-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e3eae1;
  border-radius: 5px;
  background: #fff;
  position: relative;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.person-card:hover {
  border-color: #bdcfbe;
}

.person-card[data-local="true"] {
  background: #f6faf5;
}

.person-card[data-speaking="true"] {
  border-color: #6fa683;
  box-shadow: inset 0 0 0 1px rgba(75, 141, 100, 0.34);
}

.person-avatar {
  width: 35px;
  height: 35px;
  flex: none;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-deep);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.person-info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.person-name,
.person-state {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-name {
  font-size: 13px;
}

.person-state {
  color: var(--muted);
  font-size: 10px;
}

.person-role {
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 21px;
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 3px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
}

.room-tip {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.tip-mark {
  width: 16px;
  height: 16px;
  flex: none;
  border: 1px solid #c8d1c6;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
}

.room-tip p {
  margin: 0;
}

.control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 13px 0;
  border-top: 1px solid rgba(121, 140, 124, 0.22);
}

.control-group {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.round-control {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfcf9;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 12px;
}

.round-control svg {
  width: 17px;
  height: 17px;
}

.round-control[aria-busy="true"] {
  cursor: wait;
  opacity: 0.68;
}

.round-control[data-active="true"],
.round-control.primary[data-active="true"] {
  border-color: var(--green-deep);
  background: var(--green);
  color: white;
}

.round-control.danger {
  color: var(--danger);
}

.round-control.danger:hover {
  border-color: var(--danger);
}

.chat-unread {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #c95f48;
  color: white;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
}

.round-control {
  position: relative;
}

.chat-dialog {
  width: min(420px, calc(100% - 26px));
  height: min(560px, calc(100% - 40px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(20, 38, 25, 0.2);
}

.chat-dialog::backdrop {
  background: rgba(25, 37, 27, 0.34);
}

.chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.chat-head h2 {
  margin: 0;
  font-size: 20px;
}

.chat-messages {
  height: calc(100% - 154px);
  padding: 14px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.chat-message {
  max-width: 86%;
  align-self: flex-start;
  padding: 8px 10px;
  border-radius: 5px;
  background: #edf2eb;
}

.chat-message-local {
  align-self: flex-end;
  background: var(--green-soft);
}

.chat-message-name {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.chat-message p {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.chat-form {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 62px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.chat-form .primary-button {
  min-height: 42px;
  width: auto;
  margin: 0;
  padding: 0 14px;
}

.chat-form input {
  min-height: 42px;
}

.host-control-button {
  align-self: center;
  min-height: 32px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid #b9d0bf;
  border-radius: 4px;
  background: #eef6ed;
  color: var(--green);
  font-size: 11px;
  cursor: pointer;
}

.host-dialog {
  width: min(560px, calc(100% - 30px));
  max-height: min(620px, calc(100% - 40px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(20, 38, 25, 0.2);
}

.host-dialog::backdrop {
  background: rgba(25, 37, 27, 0.34);
}

.meeting-info-dialog {
  width: min(470px, calc(100% - 30px));
}

.meeting-info-list {
  display: grid;
  gap: 1px;
  margin: 18px 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.meeting-info-list > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 13px;
  background: var(--surface);
}

.meeting-info-list span {
  color: var(--muted);
  font-size: 12px;
}

.meeting-info-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 600;
}

.meeting-info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 20px;
}

.host-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px 0;
}

.host-dialog .participants-meta {
  padding: 0 20px;
}

.host-dialog .participants-list {
  margin: 0 20px 20px;
}

.host-dialog .participant-row {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #e5ebe3;
}

.role-caption {
  display: inline-flex;
  padding: 3px 7px;
  border: 1px solid #c6d9ca;
  border-radius: 3px;
  color: var(--green);
  font-size: 10px;
  font-weight: 600;
  vertical-align: middle;
}

.host-dialog .participant-row[data-role="host"] {
  background: #f5f9f4;
}

.host-dialog .participant-name {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.host-dialog .participant-name small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
}

.host-dialog .participant-actions {
  display: flex;
  gap: 7px;
}

.host-dialog .participant-actions button {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 11px;
  cursor: pointer;
}

.waiting-room-list {
  display: grid;
  margin: 0 20px;
}

.share-request-list {
  display: grid;
  margin: 0 20px;
}

.share-request-list:empty {
  display: none;
}

.cohost-controls {
  display: grid;
  gap: 8px;
  margin: 0 20px 12px;
  padding: 10px;
  border: 1px solid #e0e8de;
  background: #f8faf6;
}

.cohost-controls select {
  min-height: 34px;
  width: 100%;
  border: 1px solid var(--line);
  background: white;
}

.cohost-list {
  display: grid;
  gap: 6px;
}

.waiting-room-list:not(:empty) {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.footer {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #8d998f;
  font-size: 11px;
}

.footer-separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b4beb4;
}

.help-dialog {
  width: min(470px, calc(100% - 32px));
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(20, 38, 25, 0.2);
}

.help-dialog::backdrop {
  background: rgba(25, 37, 27, 0.38);
  backdrop-filter: blur(3px);
}

.help-list {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.screen-stats-dialog h2 {
  font-size: 20px;
}

.screen-stats-dialog {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

.screen-stats-status {
  margin: 18px 0 10px;
  font-size: 14px;
  color: var(--green-deep);
}

.screen-stats-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 16px;
  margin: 0 0 20px;
  font-size: 13px;
}

.device-check-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.device-check-list section {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcf9;
}

.device-check-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.device-check-heading span {
  color: var(--muted);
  font-size: 11px;
}

.device-check-list select {
  width: 100%;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--ink);
}

.device-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #e2e9df;
}

.device-meter i {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: #3a8c6f;
  transition: transform 100ms linear;
}

#deviceCameraPreview {
  width: 100%;
  max-height: 240px;
  border-radius: 5px;
  background: #e9eee7;
  object-fit: contain;
}

.screen-auto-setting { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 10px 0; font-size: 13px; }
.screen-auto-setting input { width: 18px; height: 18px; min-height: 18px; padding: 0; accent-color: var(--green); }

.screen-stats-values dt,
.screen-stats-values dd {
  min-width: 0;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.screen-stats-values dt {
  color: var(--ink-soft);
}

.screen-stats-values dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.help-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.help-list li > span {
  font-family: Georgia, serif;
  color: var(--green);
  font-size: 16px;
}

.help-list p {
  margin: 1px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

[hidden] {
  display: none !important;
}

@media (max-width: 920px) {
  .lobby {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 50px;
  }

  .lobby > * {
    min-width: 0;
    width: 100%;
  }

  .stage-layout {
    grid-template-columns: 1fr;
  }

  .people-panel {
    order: -1;
  }

  .people-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .room-tip {
    margin-top: 18px;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 28px, 600px);
  }

  .topbar {
    min-height: 70px;
  }

  .connection-status {
    max-width: none;
    font-size: 12px;
  }

  .top-actions {
    gap: 8px;
  }

  .identity-badge {
    display: none;
  }

  .intro h1 {
    font-size: 34px;
    line-height: 1.16;
  }

  .intro h1 .title-line {
    display: block;
    white-space: normal;
  }

  .capability-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 12px;
  }

  .capability-row span {
    white-space: nowrap;
    gap: 5px;
  }

  .intro-copy {
    font-size: 14px;
    line-height: 1.75;
  }

  .join-card,
  .help-dialog {
    padding: 22px;
  }

  .meeting {
    padding: 18px 0 86px;
  }

  .meeting-header {
    align-items: flex-start;
  }

  .meeting-title-row {
    flex-wrap: wrap;
    gap: 9px;
  }

  .meeting-title-row h1 {
    font-size: 26px;
    overflow-wrap: anywhere;
  }

  .screen-stage,
  .screen-focus {
    min-height: 220px;
  }

  .screen-focus.annotating,
  .screen-focus.annotation-pinned {
    min-height: 320px;
  }

  .screen-toolbar {
    top: 8px;
    right: 8px;
    left: 8px;
    gap: 8px;
  }

  .screen-label {
    flex: 1;
    max-width: none;
  }

  .screen-tools {
    gap: 4px;
  }

  .screen-tool {
    width: 44px;
    height: 44px;
    flex: none;
    justify-content: center;
    padding: 0;
  }

  .screen-tool span {
    display: none;
  }

  #screenStatsButton {
    min-width: 44px;
  }

  .screen-tool svg {
    width: 20px;
    height: 20px;
    flex: none;
  }

  .annotation-tools {
    left: 8px;
    right: 8px;
    max-width: calc(100% - 16px);
    padding: 8px;
    gap: 6px;
  }

  .annotation-tools > * {
    flex-shrink: 0;
  }

  .annotation-colors {
    display: none;
  }

  .annotation-color-picker {
    display: block;
  }

  .annotation-font-size input,
  .brush-size input {
    width: 56px;
  }

  .annotation-action,
  .annotation-tool-mode {
    min-width: 44px;
    min-height: 44px;
  }

  .color-swatch {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    display: grid;
    place-items: center;
  }

  .color-swatch::before {
    content: "";
    width: 21px;
    height: 21px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: var(--swatch);
  }

  .color-swatch[data-active="true"] {
    box-shadow: none;
  }

  .color-swatch[data-active="true"]::before {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28);
  }

  .brush-size {
    min-height: 44px;
  }

  .in-meeting .control-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    margin: 0;
    padding: 9px 14px max(9px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(251, 252, 249, 0.97);
    box-shadow: 0 -8px 28px rgba(33, 50, 37, 0.11);
    backdrop-filter: blur(10px);
  }

  .in-meeting .control-group {
    display: flex;
    flex: 1;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 5px;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .in-meeting .control-group::-webkit-scrollbar {
    display: none;
  }

  .in-meeting .round-control {
    min-width: 52px;
    min-height: 46px;
    padding: 4px 5px;
    border-color: transparent;
    background: transparent;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    flex: 0 0 52px;
    scroll-snap-align: start;
  }

  .in-meeting .round-control[data-active="true"] {
    border-color: transparent;
    background: var(--green-soft);
    color: var(--green-deep);
  }

  .in-meeting .round-control.primary[data-active="true"] {
    background: var(--green);
    color: white;
  }

  .in-meeting .control-bar > .danger {
    min-width: 52px;
    min-height: 46px;
    padding: 4px 5px;
    border-color: transparent;
    background: #fbefee;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
  }

  .footer {
    display: none;
  }

  .people-panel {
    padding: 12px;
  }

  .people-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .person-card {
    min-width: 145px;
    padding: 8px;
  }

  .person-avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}
.recording-save-status {
  padding: 10px 0;
  border-block: 1px solid #d7e0d9;
  color: #285848;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.recording-save-status[data-phase="recoverable"] { color: #a02e38; }
.local-copies-dialog { width: min(680px, calc(100vw - 32px)); }
.local-copies-dialog > p, .local-copies-dialog > #localCopiesList { padding-inline: 20px; }
.local-copies-dialog > p { margin: 14px 0 0; }
.local-copies-dialog .icon-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
.recording-download-dialog { width: min(480px, calc(100vw - 32px)); }
.recording-download-dialog > * { margin-inline: 20px; }
.recording-download-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-block: 18px;
}
.recording-download-options button,
.recording-download-segments button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green);
  font: inherit;
}
.recording-download-options button:first-child { border-color: var(--green); background: var(--green); color: #fff; }
.recording-download-segments { display: grid; gap: 8px; margin-block: 14px; }
.recording-download-segments[hidden] { display: none; }
.local-copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #d7e0d9;
}
.local-copy-row > span { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.local-copy-row .my-recording-actions { flex-wrap: wrap; flex-shrink: 0; }
@media (max-width: 540px) {
  .local-copy-row { align-items: flex-start; flex-direction: column; }
  .recording-download-options { grid-template-columns: 1fr; }
}

/* Phone-sized meeting stage: prioritize the shared content, keep the share
   toolbar usable without horizontal page scroll. */
@media (max-width: 640px) {
  .stage-layout {
    min-height: 0;
    gap: 12px;
  }

  .screen-stage {
    min-height: 44vh;
  }

  .screen-toolbar {
    flex-wrap: wrap;
    gap: 6px;
  }

  .screen-tools {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .people-panel {
    max-height: 38vh;
    overflow-y: auto;
  }
}

/* Reactions: emoji float up from the bottom of the meeting stage. */
.floating-reaction {
  position: absolute;
  bottom: 96px;
  z-index: 15;
  font-size: 34px;
  line-height: 1;
  pointer-events: none;
  animation: reaction-rise 2.8s ease-out forwards;
  filter: drop-shadow(0 2px 6px rgba(20, 40, 30, 0.25));
}

.floating-reaction small {
  display: block;
  font-size: 11px;
  color: #233;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  padding: 1px 6px;
  margin-top: 2px;
  text-align: center;
}

@keyframes reaction-rise {
  0% { opacity: 0; transform: translateY(0) scale(0.6); }
  12% { opacity: 1; transform: translateY(-24px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-220px) scale(1); }
}

.reaction-wrap { position: relative; }

.reaction-bar {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(251, 252, 249, 0.98);
  box-shadow: 0 10px 30px rgba(33, 50, 37, 0.16);
  z-index: 30;
}

.reaction-bar button {
  font-size: 22px;
  line-height: 1;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
}

.reaction-bar button:hover { background: rgba(33, 50, 37, 0.08); }

/* Poll dialog */
.poll-create { display: grid; gap: 12px; }
.poll-field { display: grid; gap: 6px; }
.poll-field span { font-size: 13px; color: #4c5a52; }

.poll-option-inputs { display: grid; gap: 8px; }

.poll-option-input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ghost-button {
  justify-self: start;
  min-height: 34px;
  padding: 0 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.poll-vote { display: grid; gap: 14px; }
.poll-vote h3 { margin: 0; font-size: 17px; line-height: 1.5; }
#pollOptions { display: grid; gap: 10px; }

.poll-option-row { position: relative; }

.poll-choice {
  position: relative;
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
}

.poll-choice:disabled { cursor: default; }
.poll-choice[aria-pressed="true"] { border-color: #2c6e49; background: rgba(44, 110, 73, 0.08); }

.poll-choice-text { position: relative; z-index: 1; flex: 1; min-width: 0; }
.poll-choice-meta { position: relative; z-index: 1; font-size: 13px; color: #4c5a52; }

.poll-choice-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(44, 110, 73, 0.14);
  transition: width 0.4s ease;
}

.poll-status { margin: 0; font-size: 13px; color: #4c5a52; }

/* Follow-speaker toggle in the people panel header. */
.follow-speaker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  font-size: 12px;
  color: #4c5a52;
  cursor: pointer;
}

.follow-speaker svg { width: 14px; height: 14px; }
.follow-speaker[data-active="true"] {
  border-color: #2c6e49;
  color: #2c6e49;
  background: rgba(44, 110, 73, 0.1);
}

/* Per-participant connection quality badge. */
.person-quality {
  font-size: 11px;
  color: #4c5a52;
  white-space: nowrap;
}

.person-quality.q-excellent { color: #2c6e49; }
.person-quality.q-good { color: #4c7a2c; }
.person-quality.q-poor { color: #b4632c; }
.person-quality.q-lost { color: #a03030; font-weight: 600; }

/* Microphone level bar beside the mic button. */
.mic-level {
  width: 6px;
  height: 38px;
  border-radius: 4px;
  background: rgba(33, 50, 37, 0.12);
  overflow: hidden;
  display: inline-flex;
  align-items: flex-end;
  align-self: center;
}

.mic-level i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, #2c6e49, #7fb069);
  transform-origin: bottom;
  transform: scaleX(0);
  transition: transform 90ms linear;
}

/* Stage switching: fade the incoming content so cuts read as transitions. */
.stage-enter { animation: stage-enter 200ms ease-out; }

@keyframes stage-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* The reaction popover must lose to the hidden attribute (display:flex would
   otherwise override it) and slide in gently. */
.reaction-bar { transition: opacity 140ms ease, transform 140ms ease; }
.reaction-bar[hidden] { display: none; }

/* Dialogs pop in with a subtle rise instead of an instant swap. */
dialog[open].chat-dialog,
dialog[open].host-dialog {
  animation: dialog-enter 160ms ease-out;
}

@keyframes dialog-enter {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* Gallery view: every tile in a responsive grid; the share spans a 2x2 cell. */
.screen-media[data-gallery="true"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-auto-rows: minmax(140px, 1fr);
  gap: 10px;
  align-content: center;
  padding: 4px;
}

.screen-media[data-gallery="true"] .participant-video,
.screen-media[data-gallery="true"] .share-video {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #101613;
  border-radius: 10px;
  overflow: hidden;
}

.screen-media[data-gallery="true"] .share-video {
  grid-column: span 2;
  grid-row: span 2;
}

.tile-name { display: none; }

.screen-media[data-gallery="true"] .tile-name {
  display: block;
  position: absolute;
  left: 8px;
  bottom: 6px;
  max-width: calc(100% - 16px);
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(16, 22, 19, 0.72);
  color: #f2f5f1;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* Admin: meetings with a future schedule are flagged. */
.meeting-row[data-scheduled="true"] .room-status::after {
  content: ' · 已预约';
  color: #2c6e49;
  font-size: 12px;
}

/* Promote big videos to their own GPU layer: keeps share rendering off the
   main compositing path during canvas/overlay repaints. */
.screen-media video,
.screen-media .participant-video {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Elapsed meeting time beside the participant count. */
.meeting-duration {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: #5b6b5f;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
}

/* Leak-tracing watermark tiled over the shared stage (viewer + time + source). */
.screen-watermark {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  place-items: center;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.32);
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
  user-select: none;
}

/* Borrowed cursor semantics: each annotation tool owns a distinct pointer so
   the active tool is visible without hunting for the toolbar. Native cursors
   are used where available; laser falls back to crosshair. */
.annotation-canvas[data-tool="pen"] { cursor: crosshair; }
.annotation-canvas[data-tool="eraser"] { cursor: cell; }
.annotation-canvas[data-tool="arrow"],
.annotation-canvas[data-tool="rect"] { cursor: copy; }

.recording-control-group { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.recording-menu-toggle { display: grid; place-items: center; width: 28px; height: 40px; padding: 4px; border: 0; border-radius: 4px; background: transparent; }
.recording-menu-toggle img { width: 15px; height: 15px; }
.recording-indicator { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 150px; flex: none; padding: 6px 9px; border: 0; border-radius: 4px; color: #b7473c; background: #fff1ee; font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recording-indicator[data-paused="true"] { color: #64718a; background: #f0f3f7; }
.recording-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.recording-menu { position: fixed; inset: auto; min-width: 190px; max-width: calc(100vw - 16px); margin: 0; padding: 6px; border: 1px solid #e0e5ed; border-radius: 5px; background: #fff; color: #3e4b61; box-shadow: 0 5px 24px rgba(32,45,71,.16); }
.recording-menu::backdrop { background: transparent; }
.recording-menu > button { display: flex; align-items: center; gap: 12px; min-height: 40px; width: 100%; padding: 8px 12px; border: 0; border-radius: 3px; background: #fff; color: inherit; font: inherit; font-size: 13px; text-align: left; }
.recording-menu > button:hover { background: #f0f5ff; }
.recording-menu > button:disabled { opacity: .5; cursor: default; }
.recording-menu > button img { width: 16px; height: 16px; }
.round-control[data-paused="true"] { color: #7e899b; }
.screen-tool > img { width: 16px; height: 16px; }
