.meeting-assistant {
  width: 100%;
  min-width: 0;
}

.meeting-editor-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: clamp(14px, 1.7vw, 24px);
}

.meeting-assistant h1 {
  margin: 0;
  color: #122e51;
  font-size: clamp(1.65rem, 2.5vw, 2.4rem);
  font-weight: 720;
  line-height: 1.3;
}

.meeting-editor {
  display: grid;
  grid-template-columns: 5.6rem minmax(12rem, 20rem) auto;
  align-items: end;
  gap: 6px 10px;
  max-width: 100%;
  min-width: 0;
}

.meeting-field { display: grid; gap: 5px; min-width: 0; }

.meeting-editor label {
  color: #304e6b;
  font-size: .9rem;
  font-weight: 650;
}

.meeting-editor input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #9db1c5;
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: #132d4f;
  font: inherit;
  font-size: .95rem;
}

.meeting-editor .btn {
  min-height: 42px;
  border-radius: 8px;
}

.meeting-editor-status {
  grid-column: 1 / -1;
  justify-self: end;
  margin: 0;
  color: #136751;
  font-size: .82rem;
}

.meeting-editor-status:empty { display: none; }

.meeting-hint {
  margin: 10px 1px 0;
  color: #435e78;
  font-size: .83rem;
  line-height: 1.6;
}

.meeting-transcript {
  margin-top: 14px;
  border: 1px solid #bdcfe0;
  border-radius: 12px;
  padding: 0 clamp(14px, 2vw, 24px);
  background: #fff;
}

.meeting-transcript summary {
  padding: 14px 0;
  color: #164d7e;
  font-size: .94rem;
  font-weight: 650;
  cursor: pointer;
}

.meeting-transcript p {
  max-width: 72em;
  margin: 0 0 14px;
  color: #2b465f;
  font-size: 1rem;
  line-height: 1.85;
}

.meeting-stage {
  --stage-night: #071e3d;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: clamp(340px, min(54vw, 69svh), 790px);
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 18px;
  background: var(--stage-night);
  color: #fff;
  box-shadow: 0 6px 24px #0c2c4a1c;
}

.meeting-stage:fullscreen, .meeting-stage.is-window-presentation {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

html.meeting-window-open, html.meeting-window-open body { overflow: hidden; }

dialog.meeting-window-dialog[open] {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #071e3d;
  box-shadow: none;
}

.meeting-window-dialog::backdrop { background: #071e3d; }

.meeting-stage:focus-visible { outline: 3px solid #2876aa; outline-offset: 4px; }

.meeting-stage-frame {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  container: meeting-frame / size;
  overflow: hidden;
}

.meeting-slide {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
}

.meeting-opening {
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 101% 59%, #078a91 0%, #06758b77 19%, transparent 45%),
    radial-gradient(ellipse at 69% 2%, #245fb2 0%, #184a9533 31%, transparent 51%),
    linear-gradient(118deg, #071c43 0%, #0d326d 45%, #10558a 79%, #075376 100%);
  color: #fff;
}

.meeting-waves {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.meeting-tide {
  transform-origin: 60% 100%;
  animation: meeting-tide 15s ease-in-out infinite alternate;
}

@keyframes meeting-tide {
  from { transform: translateY(-1%) scaleY(1.02); }
  to { transform: translateY(1%) scaleY(.93); }
}

.meeting-opening-type {
  display: grid;
  justify-items: center;
  gap: min(3.6cqh, 30px);
  width: 92%;
  text-align: center;
  transform: translateY(-1.9cqh);
}

.meeting-company {
  display: flex;
  align-items: center;
  gap: .75em;
  margin: 0;
  color: #d7f4fc;
  font-size: clamp(.85rem, min(1.75cqw, 5cqh), 2.2rem);
  font-weight: 550;
  line-height: 1.5;
  letter-spacing: .12em;
}

.meeting-company::before,
.meeting-company::after {
  content: '';
  width: clamp(15px, 2.5cqw, 45px);
  height: 1px;
  background: #7de4da;
}

.meeting-slide-title {
  display: grid;
  width: 100%;
  gap: min(1.8cqh, 18px);
  margin: 0;
  color: #fff;
  line-height: 1.16;
  text-shadow: 0 2px 12px #061a374d;
}

.meeting-title-year,
.meeting-title-name { display: block; min-width: 0; }

.meeting-title-year {
  color: #e5f6ff;
  font-size: clamp(1.32rem, min(4.2cqw, 9cqh), 5.75rem);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: .045em;
  white-space: nowrap;
}

.meeting-title-name {
  font-size: min(var(--meeting-name-fit, 8cqw), 8.4cqw, 17cqh, 9rem);
  font-weight: 720;
  line-height: 1.19;
  letter-spacing: .02em;
  white-space: nowrap;
}

.meeting-welcome {
  margin: .18em 0 0;
  color: #e9f6ff;
  font-size: clamp(.96rem, min(2.15cqw, 5.5cqh), 2.5rem);
  line-height: 1.5;
  letter-spacing: .065em;
}

.meeting-notice {
  --wash: #badeef;
  --pale: #e4f5f1;
  --art-ink: #1c5279;
  --art-tint: #9eddd1;
  --art-mark: #087a6d;
  --art-accent: #0b877e;
  --dialogue-width: 88%;
  display: grid;
  grid-template: minmax(0, 1fr) auto / minmax(0, 1fr);
  justify-items: center;
  gap: clamp(8px, 2.1cqh, 23px);
  padding: min(3cqh, 28px) 3% min(3.8cqh, 40px);
  overflow: auto;
  isolation: isolate;
  background-color: var(--pale);
  color: #102e4a;
}

.meeting-notice::before {
  content: '';
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background-color: var(--wash);
  mask-image: linear-gradient(122deg, transparent, black 84%);
}

.meeting-notice[data-scene="governance"],
.meeting-notice[data-scene="microphone"] {
  --wash: #a8c9ed;
  --pale: #e6effc;
  --art-ink: #274771;
  --art-tint: #a8cce9;
  --art-mark: #1a57a0;
  --art-accent: #b07125;
}

.meeting-notice[data-scene="attendance"],
.meeting-notice[data-scene="ballot"] {
  --wash: #a0d9d1;
  --pale: #e6f4d9;
  --art-ink: #204e67;
  --art-tint: #abdbc1;
  --art-mark: #087760;
  --art-accent: #0c806b;
}

.meeting-notice[data-scene="phone"],
.meeting-notice[data-scene="camera"] {
  --wash: #f1c89e;
  --pale: #fff1d8;
  --art-ink: #63452f;
  --art-tint: #f7c97c;
  --art-mark: #9d5a23;
  --art-accent: #aa4e35;
}

.meeting-notice[data-scene="podium"] {
  --wash: #adbfe8;
  --pale: #eae7fc;
  --art-ink: #3a4775;
  --art-tint: #bdc3ea;
  --art-mark: #4e5a94;
  --art-accent: #5356a1;
}

.meeting-illustration {
  position: relative;
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  width: min(89%, 170cqh);
  height: 100%;
  min-height: 0;
  gap: min(4cqw, 10cqh);
}

.meeting-notice[data-layout="loading"] .meeting-illustration { visibility: hidden; }

.meeting-scenery {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 29% 20%, #fff9, transparent 55%),
    radial-gradient(ellipse at 70% 30%, #f8feff85, transparent 36%),
    radial-gradient(ellipse at 29% 82%, #b5d6d452, transparent 39%);
}

.meeting-scenery::before,
.meeting-scenery::after {
  content: '';
  position: absolute;
  width: 114%;
  height: 77%;
  left: -40%;
  bottom: -30%;
  border: 1px solid #ffffffaa;
  border-radius: 50%;
  transform: rotate(-18deg);
  box-shadow: 0 0 0 17px #ffffff36, 0 0 0 18px #ffffff87, 0 0 0 37px #ffffff22, 0 0 0 38px #ffffff61;
}

.meeting-scenery::after {
  left: 34%;
  bottom: -54%;
  width: 101%;
  height: 100%;
  background: #ffffff50;
  border-color: #ffffffcf;
  transform: rotate(-24deg);
  box-shadow: none;
}

.meeting-topic-art {
  justify-self: start;
  width: 97%;
  height: 90%;
  max-height: 100%;
  min-height: 0;
  overflow: visible;
}

.meeting-topic-art .art-outline {
  fill: none;
  stroke: var(--art-ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meeting-topic-art .art-paper { fill: #fffcf2; }
.meeting-topic-art .art-tint { fill: var(--art-tint); }
.meeting-topic-art .art-mark { fill: var(--art-mark); }
.meeting-topic-art .art-white { stroke: white; }
.meeting-topic-art .art-shadow { fill: var(--art-ink); opacity: .12; }
.meeting-topic-art .art-cutout { stroke: #fff6e8; stroke-width: 10; }
.meeting-topic-art :is(.art-accent, .art-check) { stroke: var(--art-accent); stroke-width: 5; }

.meeting-character {
  position: relative;
  justify-self: end;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
}

.meeting-character::before {
  content: '';
  position: absolute;
  bottom: 2%;
  left: 20%;
  width: 61%;
  height: 6%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #547e9363, #60889916 60%, transparent 72%);
}

.meeting-character > * {
  position: relative;
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}

.meeting-notice-copy {
  position: relative;
  grid-area: 2 / 1;
  width: fit-content;
  min-width: min(34rem, 100%);
  max-width: min(var(--dialogue-width), 96rem);
  justify-self: center;
  align-self: start;
  padding: clamp(10px, 1.8cqh, 20px) clamp(12px, 2.1cqw, 36px);
  border: 1px solid #789ba58a;
  border-radius: clamp(12px, 2.4cqh, 24px);
  background: #fbfdff;
  box-shadow: 0 4px 12px #244c6820;
}

/* The tallest complete paragraph sets the dialogue row for every chapter.
   Each visible bubble still fits its own text inside that fixed space. */
.meeting-dialogue-measure {
  visibility: hidden;
  pointer-events: none;
}

.meeting-notice-copy::before {
  content: '';
  position: absolute;
  left: 23%;
  top: -1px;
  width: clamp(9px, 1.7cqh, 16px);
  height: clamp(9px, 1.7cqh, 16px);
  border-block-start: 1px solid #789ba58a;
  border-inline-start: 1px solid #789ba58a;
  background: #fbfdff;
  transform: translateY(-50%) rotate(45deg);
}

.meeting-dialogue-heading {
  display: flex;
  align-items: center;
  gap: .7em;
  margin: 0 0 min(1cqh, 8px);
  min-width: 0;
}

.meeting-section-label {
  display: inline-block;
  flex: none;
  padding: .12em .52em;
  border: 1px solid var(--art-tint);
  border-radius: .36em;
  background: var(--pale);
  color: var(--art-ink);
  font-size: clamp(.76rem, min(1.15cqw, 2.5cqh), 1.5rem);
  font-weight: 650;
  line-height: 1.3;
}

.meeting-section-title {
  margin: 0;
  color: #102e50;
  font-size: clamp(.94rem, min(1.6cqw, 3.65cqh), 2rem);
  font-weight: 700;
  line-height: 1.23;
}

.meeting-caption {
  margin: 0;
  color: #243c52;
  font-size: clamp(.94rem, min(1.47cqw, 3.5cqh), 2.05rem);
  font-weight: 480;
  line-height: 1.52;
  line-break: strict;
  overflow-wrap: anywhere;
}

.meeting-stage-toolbar {
  /* The controls have a reserved grid row in both the page and fullscreen. */
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px 16px;
  min-width: 0;
  padding: 9px clamp(12px, 2.15vw, 33px);
  padding-bottom: max(9px, env(safe-area-inset-bottom));
  border-top: 1px solid #6facbc63;
  background: #092442;
  color: #f0f7ff;
}

.meeting-stage-context,
.meeting-stage-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.meeting-stage-controls { margin-inline-start: auto; }

.meeting-page-index, .meeting-clock {
  color: #d6e6f4;
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.meeting-clock { min-inline-size: 11ch; }

.meeting-page-index {
  padding-inline-end: .75em;
  border-inline-end: 1px solid #7193ab;
  font-weight: 650;
  letter-spacing: .08em;
}

.meeting-page-name { font-size: .84rem; }

.meeting-stage-controls button,
.meeting-chapter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  border: 1px solid #6f91aa;
  border-radius: 8px;
  padding: 7px 12px;
  background: #113454;
  color: #f5faff;
  font: inherit;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
}

.meeting-stage-controls button:hover, .meeting-chapter:hover { background: #214b69; }

.meeting-stage-controls .meeting-control-primary {
  border-color: #85e6d2;
  background: #85e6d2;
  color: #0b343e;
  font-weight: 700;
}

.meeting-stage-controls .meeting-control-primary:hover { background: #a9f1e2; }

.meeting-control-icon {
  flex: none;
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meeting-chapter {
  max-width: 15em;
  min-height: 36px;
  padding: 6px 5px;
  border-color: #486e8b;
  border-radius: 5px;
  font-size: .82rem;
}

.meeting-stage-controls button:focus-visible, .meeting-chapter:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.meeting-stage-status {
  position: absolute;
  z-index: 2;
  bottom: 0;
  right: 0;
  max-width: 95%;
  margin: 0;
  border-radius: 6px 0 0;
  padding: 6px 12px;
  background: #092442;
  color: #fff;
  font-size: .875rem;
  line-height: 1.5;
}

.meeting-stage-status:empty,
.meeting-stage [hidden],
.meeting-transcript[hidden] { display: none; }

@media (max-width: 720px) {
  .meeting-editor-bar { gap: 9px 16px; }
  .meeting-stage { height: clamp(395px, 70svh, 570px); border-radius: 13px; }
  .meeting-stage-toolbar { gap: 6px 12px; padding: 7px 10px; padding-bottom: max(7px, env(safe-area-inset-bottom)); }
  .meeting-stage-context, .meeting-stage-controls { gap: 5px; }
  .meeting-stage-controls button { min-height: 40px; padding: 7px 8px; gap: 4px; }
  .meeting-chapter { max-width: 13em; }
}

@container meeting-frame (max-width: 700px) {
  .meeting-notice {
    --dialogue-width: 100%;
    gap: 9px;
    padding: 10px 3.2% 12px;
  }
  .meeting-illustration {
    width: 100%;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 0;
  }
  .meeting-character::before { display: none; }
  .meeting-topic-art { width: 100%; height: 88%; }
  .meeting-notice-copy { padding: 10px 13px; }
  .meeting-dialogue-heading { gap: 7px; margin-bottom: 5px; }
  .meeting-section-label { font-size: .76rem; }
  .meeting-section-title { font-size: 1.02rem; }
  .meeting-caption { font-size: clamp(.88rem, 3.65cqw, 1rem); line-height: 1.48; }
}

@container meeting-frame (max-width: 520px) and (min-height: 525px) {
  .meeting-illustration { display: block; }
  .meeting-character { position: absolute; left: 0; top: 10%; width: 70%; height: 86%; }
  .meeting-topic-art { position: absolute; right: 0; top: 2%; width: 45%; height: 62%; }
}

@container meeting-frame (max-width: 420px) and (min-height: 341px) and (max-height: 460px) {
  .meeting-notice { gap: 6px; padding: 6px 2.5% 8px; }
  .meeting-notice-copy { padding: 7px 10px; }
  .meeting-dialogue-heading { margin-bottom: 3px; }
  .meeting-section-title { font-size: .94rem; }
  .meeting-caption { font-size: clamp(.82rem, 3.5cqw, .91rem); line-height: 1.4; }
}

@container meeting-frame (max-height: 340px) {
  .meeting-notice { gap: 5px; padding: 5px 2.5% 7px; }
  .meeting-notice-copy { max-width: 100%; padding: 6px 12px; border-radius: 10px; }
  .meeting-dialogue-heading { gap: 7px; margin-bottom: 3px; }
  .meeting-section-label { font-size: .71rem; }
  .meeting-section-title { font-size: .88rem; }
  .meeting-caption { font-size: clamp(.79rem, 2.4cqw, .93rem); line-height: 1.37; }
}

@container meeting-frame (max-height: 210px) {
  .meeting-opening-type { gap: 4px; }
  .meeting-slide-title { gap: 3px; }
  .meeting-title-year { font-size: min(4.2cqw, 9cqh); }
  .meeting-illustration { width: min(98%, 190cqh); }
  .meeting-notice { gap: 3px; padding: 3px 2% 5px; }
  .meeting-notice-copy { padding: 4px 9px; }
  .meeting-dialogue-heading { margin-bottom: 2px; }
  .meeting-caption { font-size: clamp(.75rem, min(2cqw, 6.8cqh), .85rem); line-height: 1.28; }
}

@container meeting-frame (min-width: 450px) and (min-height: 190px) and (max-height: 310px) {
  .meeting-notice {
    grid-template: minmax(0, 1fr) / minmax(0, .82fr) minmax(0, 1.18fr);
    gap: 12px;
  }
  .meeting-illustration { display: block; width: 100%; }
  .meeting-character { position: absolute; bottom: 0; left: 0; width: 75%; height: 97%; }
  .meeting-topic-art { position: absolute; right: 0; top: 1%; width: 44%; height: 56%; }
  .meeting-notice-copy {
    grid-area: 1 / 2;
    align-self: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .meeting-notice-copy::before {
    top: 45%;
    left: 0;
    transform: translate(-50%, -50%) rotate(-45deg);
  }
}

@media (max-width: 510px) {
  .meeting-editor { width: 100%; grid-template-columns: 4.6rem minmax(0, 1fr) auto; gap: 5px 7px; }
  .meeting-editor input { padding-inline: 7px; }
  .meeting-editor .btn { padding-inline: 9px; font-size: .83rem; }
  .meeting-stage { height: clamp(500px, 72svh, 660px); }
  .meeting-stage-toolbar { gap: 6px; }
  .meeting-stage-controls button { padding: 8px 7px; font-size: .79rem; }
  .meeting-stage-controls:has([data-slide-play]:not([hidden])) { width: 100%; justify-content: space-between; }
  .meeting-stage-controls:has([data-slide-play]:not([hidden])) .meeting-control-icon { width: 1em; height: 1em; }
  .meeting-chapter { min-height: 30px; }
}

@media (max-height: 430px) and (orientation: landscape) {
  .meeting-stage-toolbar { padding-top: 4px; padding-bottom: max(4px, env(safe-area-inset-bottom)); }
  .meeting-stage-controls button { min-height: 36px; }
}

@media (max-width: 390px) {
  .meeting-stage-controls:has([data-slide-play]:not([hidden])) .meeting-control-icon { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .meeting-opening-type,
  .meeting-waves,
  .meeting-scenery,
  .meeting-chapter-ink {
    animation: meeting-content-arrive 180ms ease-out;
  }

  .meeting-notice, .meeting-notice::before {
    transition: background-color 180ms ease-out;
  }
}

@keyframes meeting-content-arrive {
  from { opacity: .58; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .meeting-tide { animation: none; }
}
