/* Projection retains its existing full-screen shell and spacing. */
body:not([data-projection-mode]) > .tyt-section {
  padding-block: var(--tyt-space-page-block);
}

body:not([data-projection-mode]) #speaker-shell {
  --tyt-page-gutter: var(--tyt-space-page-gutter);
  --tyt-container: var(--tyt-page-max-width);
}

#speaker-shell .tyt-card {
  min-height: 0;
  align-items: stretch;
}

body:not([data-projection-mode]) .speaker-question-hero {
  border-color: var(--tyt-color-border-strong);
}

body:not([data-projection-mode]) .speaker-question-hero .question-body {
  font-size: var(--tyt-font-size-h3);
}

body:not([data-projection-mode]) .speaker-question:not(.speaker-question-hero) {
  background: var(--tyt-color-surface-subtle);
}

body:not([data-projection-mode]) .speaker-question:not(.speaker-question-hero) .question-body {
  font-size: var(--tyt-font-size-body);
}

body:not([data-projection-mode]) #question-queue > section > h2 {
  font-size: var(--tyt-font-size-h5);
}

[data-role="vote-chip"] {
  white-space: nowrap;
  flex-shrink: 0;
  --tyt-badge-font-size: var(--tyt-font-size-label);
  font-weight: var(--tyt-font-weight-strong);
  font-variant-numeric: tabular-nums;
}

html:not([data-theme="dark"]) body[data-projection-mode] {
  --tyt-color-canvas: var(--tyt-color-code-surface);
  --tyt-color-text: var(--tyt-color-code-text);
  --tyt-color-text-muted: var(--tyt-color-code-muted);
}

body[data-projection-mode] {
  min-height: 100vh;
  background: var(--tyt-color-canvas);
  color: var(--tyt-color-text);
}

body[data-projection-mode] .app-header,
body[data-projection-mode] [data-question-answerer],
body[data-projection-mode] [data-meta="author"],
body[data-projection-mode] [data-meta="answer"] {
  display: none;
}

body[data-projection-mode] [data-meta="number"] {
  font-family: var(--tyt-font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--tyt-color-text-muted);
}

body[data-projection-mode] [data-meta="number"],
body[data-projection-mode] [data-role="vote-chip"] {
  font-size: var(--tyt-font-size-h5);
}

body[data-projection-mode] #speaker-shell {
  max-width: 1200px;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: center;
}

body[data-projection-mode] > .tyt-section {
  padding-block: 0;
}

body[data-projection-mode] #projection-session-title {
  grid-row: 1;
  font-size: var(--tyt-font-size-h5);
  color: var(--tyt-color-text-muted);
  border-block-end: var(--tyt-divider-width) solid var(--tyt-color-border);
}

body[data-projection-mode] #projection-controls {
  grid-row: 3;
}

body[data-projection-mode] #speaker-shell > section {
  grid-row: 2;
  align-self: center;
}

body[data-projection-mode] #speaker-shell:has(.length-lg, .length-xl) {
  align-content: start;
}

body[data-projection-mode] #speaker-shell:has(.length-lg, .length-xl) > section {
  align-self: start;
}

body[data-projection-mode] .speaker-question .question-body {
  max-width: var(--tyt-prose-measure);
  margin-inline: auto;
  font-size: var(--tyt-font-size-h1);
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

body[data-projection-mode] .question-body.length-md {
  font-size: var(--tyt-font-size-h2);
}

body[data-projection-mode] .question-body.length-lg,
body[data-projection-mode] .question-body.length-xl {
  font-size: var(--tyt-font-size-h3);
}

body[data-projection-mode] #speaker-shell > section,
body[data-projection-mode] .speaker-question {
  background: transparent;
  border: 0;
  box-shadow: none;
}

body[data-projection-mode] .question-body,
body[data-projection-mode] .tyt-empty {
  color: var(--tyt-color-text);
}

body[data-projection-mode] .tyt-empty {
  font-size: var(--tyt-font-size-h3);
}

body[data-projection-mode] #projection-controls {
  padding: var(--tyt-space-4);
  border-radius: var(--tyt-radius-md);
  background: var(--tyt-color-canvas);
  color: var(--tyt-color-text);
}

#projection-controls summary {
  cursor: pointer;
}

#projection-controls[open] summary {
  margin-bottom: var(--tyt-space-stack-gap);
}

html:has(body[data-projection-transparent]),
body[data-projection-transparent] {
  background: transparent;
}

body[data-projection-mode][data-projection-transparent] #speaker-shell {
  align-content: end;
}

body[data-projection-mode][data-projection-transparent] #speaker-shell > section {
  align-self: end;
}

body[data-projection-transparent] .question-body,
body[data-projection-transparent] #projection-session-title,
body[data-projection-transparent] .tyt-empty {
  text-shadow: 0 1px 3px var(--tyt-color-code-surface), 0 0 8px var(--tyt-color-code-surface);
}

body[data-projection-transparent] #projection-controls {
  opacity: 0;
}

body[data-projection-transparent] #projection-controls:hover,
body[data-projection-transparent] #projection-controls:focus-within {
  opacity: 1;
}

#session-title-label[aria-busy="true"] {
  display: inline-block;
  inline-size: 12em;
  block-size: 1.5em;
  background: var(--tyt-color-surface-subtle);
}

/* M2 applies to the working view; projection keeps its full-screen spacing. */
body:not([data-projection-mode]) #speaker-shell,
body:not([data-projection-mode]) #question-queue {
  gap: var(--tyt-space-section-gap);
}

body:not([data-projection-mode]) #speaker-shell .tyt-card {
  --tyt-component-padding: var(--tyt-space-card-padding);
  gap: var(--tyt-space-stack-gap);
}

/* M3 only adjusts content rhythm; projection shell dimensions stay full-bleed. */
body:not([data-projection-mode]) #question-queue > section {
  gap: var(--tyt-space-list-gap);
}

body:not([data-projection-mode]) #speaker-shell .tyt-cluster {
  gap: var(--tyt-space-control-gap);
}

body:not([data-projection-mode]) .speaker-question .question-body {
  line-height: var(--tyt-line-height-question);
}

body:not([data-projection-mode]) .speaker-question [data-question-meta],
body:not([data-projection-mode]) .speaker-question [data-question-answerer] {
  line-height: var(--tyt-line-height-meta);
}
