.lobby-action,
.lobby-notebook button {
  min-height: 36px;
  border: 1px solid #51485f;
  border-radius: var(--ds-radius-md);
  padding: 6px 12px;
  background: #2d2738;
  color: #f5eeff;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
}
.lobby-action:hover,
.lobby-notebook button:hover { background: #413453; }
#lobby-sessions { justify-self: start; }

.lobby-notebook {
  width: min(860px, calc(100% - 24px));
  max-width: none;
  max-height: min(800px, calc(100dvh - 32px));
  overflow: auto;
  padding: clamp(12px, 3vw, 26px);
  background: #201c29;
  color: #f5eeff;
  border: 1px solid #60516f;
  border-radius: var(--ds-radius-xl);
  box-shadow: 0 14px 60px #08060cb3;
  z-index: 120;
}
.lobby-notebook::backdrop { background: #100a18ad; }
body[data-room-sessions] { background: #202020; }
body[data-room-sessions] > :is(.topbar, main) { display: none; }
body[data-room-sessions] .lobby-notebook {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 960px;
  height: 100dvh;
  max-height: none;
  padding: clamp(16px, 4vw, 36px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: inherit;
}
body[data-room-sessions].orbit-desktop .lobby-notebook { padding-top: 48px; }
body[data-room-sessions] .lobby-notebook::backdrop { background: #202020; }
/* In a call the notebook is a non-modal panel between the room's top navigation and its control bar.
   lobby.js mirrors the room's measured --call-nav-height and --control-bar-height onto the dialog, so a
   wrapped bar stays clickable. Very short windows keep a usable panel height instead. */
.lobby-notebook[data-in-call] {
  position: fixed; inset: calc(var(--call-nav-height, 52px) + 3px) 12px auto auto; margin: 0; width: min(680px, calc(100% - 24px));
  max-height: max(calc(100dvh - var(--call-nav-height, 52px) - var(--control-bar-height, 44px) - 6px), min(260px, calc(100dvh - 16px)));
}
/* Beside an open Messages, Attendees or Transcript drawer when both fit; narrower windows show the notebook over the drawer. */
@media (min-width: 1004px) {
  body:has(.orbit-call .orbit-chat-panel:not(.orbit-chat-panel-exit)) .lobby-notebook[data-in-call] { right: 312px; }
}
.notebook-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.notebook-header h2, .notebook-header p { margin: 0; overflow-wrap: anywhere; }
.notebook-header p { margin-bottom: 4px; color: #c4b6d3; font-size: .85rem; }
.notebook-header h2 { font-size: 1.5rem; }
.notebook-status { margin: 0 0 14px; padding: 8px 12px; color: #f7e4be; background: #3b3028; border-radius: var(--ds-radius-md); }
.notebook-nav, .notebook-tabs, .notebook-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.notebook-nav { margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #ffffff20; }
.notebook-nav button[aria-current], .notebook-tabs button[aria-selected="true"] { border-color: #c7a7f4; background: #493661; }
.notebook-sessions { display: grid; grid-template-columns: minmax(155px, 1fr) minmax(0, 2.4fr); gap: 24px; }
.notebook-sessions > label { align-self: start; font-size: .875rem; font-weight: 600; }
.notebook-sessions > label > span { margin-bottom: 4px; }
#notebook-session-picker:not([size="1"]) option { padding: 7px 4px; }
.notebook-session-body { display: grid; gap: 14px; align-content: start; min-width: 0; }
.notebook-session-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.notebook-session-body .notebook-session-header h3 { margin: 0; font-size: 1rem; }
.notebook-tabs { padding-bottom: 8px; border-bottom: 1px solid #ffffff20; }
.notebook-reading { white-space: pre-wrap; overflow-wrap: anywhere; }
.notebook-entry { background: #292333; padding: 12px 14px; border: 1px solid #443b50; border-radius: var(--ds-radius-md); overflow-wrap: anywhere; }
.notebook-entry:focus { outline:var(--ds-focus-width) solid var(--ds-focus-color); outline-offset:var(--ds-focus-offset); }
.notebook-proposals { display: grid; gap: 10px; margin: 10px 0 0; padding: 0; list-style: none; }
.notebook-entry p, .notebook-session-body h3 { margin: 0 0 8px; }
.notebook-entry small, .notebook-meta { color: #d1c4dc; font-size: .85rem; }
.notebook-entry time { margin-inline-start: 8px; }
.notebook-list { display: grid; gap: 8px; list-style: none; padding: 0; }
.notebook-transcript-pagination { display: contents; }
.notebook-transcript-pagination[data-paged] {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 12px;
  padding-block: 4px;
  background: #201c29;
}
.notebook-transcript-pagination[data-paged] p { margin: 0; }
.notebook-transcript-pagination button[aria-disabled="true"] { opacity: .55; cursor: default; }
.notebook-transcript-pagination[data-paged] + .notebook-list > .notebook-entry { scroll-margin-block-start: 6rem; }
.lobby-notebook form { display: grid; gap: 10px; padding: 10px 0; }
.lobby-notebook form button { justify-self: start; }
.lobby-notebook label { display: grid; gap: 4px; }
.lobby-notebook :is(input:not([type="checkbox"]), textarea, select) {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid #6a5b7a;
  border-radius: var(--ds-radius-md);
  background: #16121c;
  color: #f5eeff;
  font: inherit;
}
.lobby-notebook label:has([type="checkbox"]) { display: flex; align-items: center; }
.lobby-notebook textarea { min-height: 80px; resize: vertical; }
.lobby-notebook .orbit-disclosure-toggle { min-height: 32px; margin-block: 4px; border: 0; background: transparent; }
.lobby-notebook .orbit-disclosure-toggle:hover { background: #ffffff14; }
.lobby-notebook .orbit-disclosure-toggle:active:enabled { background: #ffffff24; }
.lobby-notebook .orbit-disclosure-body:not([hidden]) { display: grid; gap: 8px; padding-block: 2px 8px; }
.orbit-campfire .orbit-character { position: absolute; inset: auto 0 -1.35em; text-align: center; font-size: .75rem; text-shadow: 0 1px 4px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.orbit-floating .orbit-character { display: none; }
.orbit-floating .orbit-person:is(:hover, :focus-within) .orbit-character { display: block; position: absolute; inset: auto 1px 1px; border-radius: var(--ds-radius-md); background: #231833; padding: 2px 4px; font-size: .625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.orbit-roster-character { display: block; color: #d1c4dc; font-size: .75rem; }
@media (max-width: 610px) {
  .notebook-sessions { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

.lobby-notebook :is(button,select,input,textarea) { min-width:0; max-width:100%; }
.lobby-notebook :is(h2,h3,p,label,button) { overflow-wrap:anywhere; }
.lobby-notebook button:active:enabled { background:#51485f; }

#lobby-notebook iframe[title="Room whiteboard canvas"] {
  display:block;
  width:100%;
  height:clamp(240px, 48vh, 660px);
  background:white;
  border:0;
  border-radius:var(--ds-radius-md);
}

/* Reduced motion: whatever moves inside these surfaces (their own rules or shared ones from style.css,
   room.css and design-system.css) settles at its end state at once. Near-zero rather than zero keeps
   transitionend and animationend firing for scripts that wait on them. Nothing changes when motion is allowed. */
@media (prefers-reduced-motion: reduce) {
  :where(.lobby-notebook, .lobby-action),
  :where(.lobby-notebook, .lobby-action) *,
  :where(.lobby-notebook, .lobby-action)::before,
  :where(.lobby-notebook, .lobby-action)::after,
  :where(.lobby-notebook, .lobby-action) *::before,
  :where(.lobby-notebook, .lobby-action) *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
  }
}
