/* Reference UI shell: compact toolbox, dark inspector and camera-first layout. */
:root {
  --timeline-height: 252px;
  --timeline-collapsed-height: 44px;
  --timeline-label-width: 140px;
  --toolbox-width: 96px;
  --properties-width: 350px;
  --properties-collapsed-width: 46px;
  --ui-black: #111313;
  --ui-panel: #2c2c2c;
  --ui-panel-2: #333;
  --ui-purple: #a409bc;
  --ui-magenta: #ed25dd;
  --ui-blue: #198dac;
  --ui-workspace: #b9edf6;
  --camera-shift-x: 0px;
  --camera-shift-y: 0px;
  --camera-frame-width: calc(100% - 4px);
  --camera-frame-height: calc(100% - 4px);
}

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--ui-black);
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #ef49de;
  outline-offset: 2px;
}

.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.editor-shell {
  min-width: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--toolbox-width) minmax(0, 1fr) var(--properties-width);
  grid-template-rows: 138px minmax(0, 1fr) var(--timeline-height);
  background: var(--ui-black);
}

.editor-body {
  display: contents;
}

.appbar {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 1;
  display: block;
  width: 100%;
  height: auto;
  min-width: 0;
  padding: 0;
  background: var(--ui-black);
  color: #fff;
  border: 0;
  border-bottom: 1px solid #242626;
  box-shadow: none;
  z-index: 30;
}

.account-project-controls {
  position: absolute;
  top: 10px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  transform: translateX(-50%);
}

.appbar-project {
  position: static;
  display: flex;
  min-width: 0;
  transform: none;
}

.brand-mark,
.brand-name {
  display: none;
}

.brand input,
#project-title {
  width: 190px;
  height: 40px;
  padding: 5px 11px;
  border: 1px solid #3d4142;
  border-radius: 5px;
  background: #202222;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  text-align: left;
}

.auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 92px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #347d91;
  border-radius: 5px;
  background: #1f839e;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.recent-projects-button[hidden],
.generated-library-button[hidden] {
  display: none;
}

.auth-button[data-authenticated="true"] {
  border-color: #6a6e70;
  background: #303334;
}

.auth-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#auth-dialog {
  width: min(430px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #edf2f7;
  box-shadow: 0 26px 90px #000b;
}

#auth-dialog::backdrop {
  background: #05090fd9;
  backdrop-filter: blur(4px);
}

.auth-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid #3e4654;
  border-radius: 16px;
  background: linear-gradient(155deg, #202634, #111722);
  box-shadow: inset 0 1px #ffffff0f;
}

.auth-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.auth-dialog-heading h2,
.auth-dialog-heading p,
.auth-dialog-status {
  margin: 0;
}

.auth-dialog-heading h2 {
  font-size: 22px;
}

.auth-dialog-heading p {
  margin-top: 5px;
  color: #9ba8bb;
  font-size: 12px;
  line-height: 1.45;
}

.auth-dialog-heading button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #303846;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid #46536a;
  border-radius: 8px;
  background: #fff;
  color: #263142;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.auth-google svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.auth-google:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #718096;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8795a8;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #344153;
}

.auth-field {
  display: grid;
  gap: 7px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 750;
}

.auth-field input {
  width: 100%;
  height: 44px;
  border: 1px solid #46536a;
  border-radius: 8px;
  padding: 0 12px;
  outline: 0;
  background: #0d1420;
  color: #fff;
  font: 500 14px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
}

.auth-field input:focus {
  border-color: #22a5c3;
  box-shadow: 0 0 0 3px #22a5c326;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #b8c3d2;
  font-size: 12px;
  cursor: pointer;
}

.auth-remember input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #168ba5;
}

.auth-dialog-status {
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid #344153;
  border-radius: 8px;
  background: #0c121c;
  color: #b9c6d7;
  font-size: 12px;
  line-height: 1.4;
}

.auth-dialog-status[data-state="error"] {
  border-color: #a64455;
  background: #401d25;
  color: #ffdce2;
}

.auth-dialog-status[data-state="loading"] {
  border-color: #2b7185;
  color: #c9f4ff;
}

.auth-submit {
  min-height: 44px;
  border: 1px solid #22a5c3;
  border-radius: 8px;
  background: #168ba5;
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.auth-submit:hover:not(:disabled),
.auth-dialog-heading button:hover:not(:disabled) {
  filter: brightness(1.13);
}

.auth-card :disabled,
.auth-button:disabled {
  cursor: wait;
  opacity: .55;
}

#generated-library-dialog {
  width: min(880px, calc(100vw - 28px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 28px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #edf2f7;
  box-shadow: 0 26px 90px #000b;
}

#generated-library-dialog::backdrop {
  background: #05090fd9;
  backdrop-filter: blur(4px);
}

.generated-library-card {
  display: grid;
  gap: 16px;
  max-height: min(760px, calc(100dvh - 28px));
  padding: 24px;
  overflow: hidden;
  border: 1px solid #3e4654;
  border-radius: 16px;
  background: linear-gradient(155deg, #202634, #111722);
  box-shadow: inset 0 1px #ffffff0f;
}

.generated-library-heading,
.generated-library-heading-actions,
.generated-library-section > header,
.generated-library-item,
.generated-library-actions {
  display: flex;
  align-items: center;
}

.generated-library-heading,
.generated-library-section > header,
.generated-library-item {
  justify-content: space-between;
}

.generated-library-heading h2,
.generated-library-section h3,
.generated-library-heading p,
.generated-library-section p,
.generated-library-item p {
  margin: 0;
}

.generated-library-heading h2 {
  font-size: 21px;
}

.generated-library-heading p {
  margin-top: 4px;
  color: #9ba8bb;
  font-size: 12px;
}

.generated-library-heading-actions {
  gap: 7px;
}

.generated-library-heading-actions button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #303846;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.generated-library-heading-actions button:hover:not(:disabled) {
  background: #3d4858;
}

.generated-library-heading-actions button:disabled {
  cursor: default;
  opacity: .4;
}

.generated-library-status {
  min-height: 38px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #344153;
  border-radius: 8px;
  background: #0c121c;
  color: #b9c6d7;
  font-size: 13px;
}

.generated-library-entitlement,
.premium-export-entitlement {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #345979;
  border-radius: 8px;
  background: #102438;
  color: #c9e8ff;
  font-size: 12px;
}

.generated-library-status[data-state="error"] {
  border-color: #a64455;
  background: #401d25;
  color: #ffdce2;
}

.generated-library-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}

.generated-library-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 270px;
  overflow: hidden;
  border: 1px solid #354052;
  border-radius: 11px;
  background: #121925;
}

.generated-library-section > header {
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #303b4b;
  background: #182130;
}

.generated-library-section h3 {
  color: #fff;
  font-size: 15px;
}

.generated-library-section > header p {
  margin-top: 4px;
  color: #8f9caf;
  font-size: 10px;
  line-height: 1.35;
}

.generated-library-section output {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 14px;
  background: #26364a;
  color: #8de5f7;
  font-size: 11px;
  font-weight: 850;
}

.generated-library-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  max-height: 420px;
  padding: 10px;
  overflow: auto;
  scrollbar-color: #526176 #151c27;
}

.generated-library-empty {
  padding: 42px 16px;
  color: #8491a3;
  font-size: 12px;
  text-align: center;
}

.generated-library-item {
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #343f50;
  border-radius: 8px;
  background: #1a2330;
}

.generated-library-item > div:first-child {
  min-width: 0;
}

.generated-library-item strong {
  display: block;
  overflow: hidden;
  color: #f8fafc;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generated-library-item p {
  margin-top: 5px;
  overflow: hidden;
  color: #93a1b4;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generated-library-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.generated-library-actions button {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #536177;
  border-radius: 6px;
  background: #283548;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.generated-library-actions button:first-child {
  border-color: #178fa9;
  background: #147e96;
}

.generated-library-actions button[data-generated-delete] {
  border-color: #a63d4c;
  background: #7f2634;
}

.generated-library-actions button:hover:not(:disabled) {
  filter: brightness(1.14);
}

.generated-library-actions button:disabled {
  cursor: default;
  opacity: .45;
}

@media (max-width: 720px) {
  .generated-library-card {
    padding: 16px;
  }

  .generated-library-sections {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .generated-library-section {
    min-height: 230px;
  }

  .generated-library-list {
    max-height: 280px;
  }
}

.video-format-control {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  color: #d7dadb;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.video-format-control select {
  width: 155px;
  height: 40px;
  padding: 0 30px 0 10px;
  border: 1px solid #3d4142;
  border-radius: 5px;
  background: #202222;
  color: #fff;
  cursor: pointer;
}

.video-format-control output {
  min-width: 82px;
  color: #aeb5b7;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.top-toolbox,
.topbar-cta,
.preview-cluster {
  display: flex;
  align-items: center;
}

.top-toolbox {
  position: absolute;
  left: 18px;
  bottom: 18px;
  gap: 17px;
}

.top-toolbox button,
.topbar-cta button,
.zoom-controls button {
  border: 0;
  cursor: pointer;
}

.top-toolbox button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 3px;
  border-radius: 4px;
  background: transparent;
  color: #f8f8f8;
}

.top-toolbox .recent-projects-button {
  min-width: 0;
  width: 34px;
  height: 34px;
  padding: 3px;
  border: 0;
  background: transparent;
}

.top-toolbox button:hover,
.top-toolbox button.active,
.top-toolbox button[aria-pressed="true"] {
  background: #303233;
}

.top-toolbox svg,
.topbar-cta svg,
.fit-camera-button svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-tool-divider {
  width: 1px;
  height: 32px;
  margin-inline: -4px;
  background: #202222;
}

.topbar-cta {
  position: absolute;
  right: 18px;
  bottom: 18px;
  gap: 11px;
}

.download-button {
  height: 48px;
  border-radius: 6px !important;
  color: #123545;
  font-size: 20px;
  font-weight: 800;
}

.zoom-controls button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.download-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 184px;
  padding: 0 22px;
  background: #208ba8;
  color: #fff;
}

.download-button svg {
  width: 24px;
  height: 24px;
}

.preview-cluster {
  height: 48px;
  overflow: hidden;
  border-radius: 5px;
  background: #fafafa;
}

.preview-cluster button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 48px;
  padding: 10px;
  border-right: 1px solid #1e3239;
  border-radius: 0;
  background: #fafafa;
  color: #123b4c;
  font-size: 23px;
}

.preview-cluster button:last-child {
  border-right: 0;
}

.preview-cluster button:hover,
.auth-button:hover,
.recent-projects-button:hover,
.download-button:hover {
  filter: brightness(1.07);
}

.help-button {
  width: 38px;
  height: 38px;
  margin-left: 10px;
  border-radius: 50%;
  background: #f7f7f7;
  color: #202223;
  font-size: 25px;
  font-weight: 900;
}

.left-sidebar {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  width: auto;
  max-width: none;
  padding: 0;
  overflow: visible !important;
  border: 0;
  background: #171919;
  color: #fff;
  z-index: 20;
}

.sidebar-tabs {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1px;
  padding: 12px 12px 8px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  scrollbar-width: thin;
  scrollbar-color: #6b6d6e transparent;
}

.sidebar-tabs button {
  flex: 0 0 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 72px;
  min-height: 0;
  padding: 8px 4px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #f1f1f1;
  font-size: 15px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
}

.sidebar-tabs button:hover {
  background: #292b2b;
  color: #fff;
}

.sidebar-tabs button.active {
  background: linear-gradient(135deg, #b718c1, #7603a5);
  color: #fff;
}

.sidebar-tabs svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-tabs [data-tab="background"] span {
  font-size: 11px;
}

.text-tool-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font: 700 36px/1 Georgia, serif;
}

.tool-panels {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%;
  display: none;
  width: 260px;
  padding: 20px 15px;
  overflow-y: auto;
  border-left: 1px solid #343636;
  border-right: 1px solid #3c3e3f;
  background: #202222;
  box-shadow: 15px 0 35px #0005;
  color: #fff;
  z-index: 25;
}

.left-sidebar.tools-expanded .tool-panels {
  display: block;
}

.tool-drawer-close {
  position: absolute;
  top: 9px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #373939;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.tool-panel {
  display: none;
  gap: 8px;
}

.tool-panel.active {
  display: grid;
}

.tool-panel h2 {
  margin: 0 30px 10px 2px;
  color: #fff;
  font-size: 18px;
}

.scene-tool-panel {
  align-content: start;
}

.scene-tool-heading h2 {
  margin-bottom: 5px;
}

.scene-tool-heading p {
  margin: 0 28px 14px 2px;
  color: #b8bcbc;
  font-size: 11px;
  line-height: 1.45;
}

.scene-category-list {
  display: grid;
  gap: 7px;
}

.scene-category {
  overflow: hidden;
  border: 1px solid #414545;
  border-radius: 7px;
  background: #292b2b;
}

.scene-category summary {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 10px;
  color: #f0f2f2;
  cursor: pointer;
  list-style: none;
}

.scene-category summary::-webkit-details-marker {
  display: none;
}

.scene-category summary::after {
  content: "›";
  grid-column: 3;
  grid-row: 1;
  margin-left: 5px;
  color: #aeb2b2;
  font-size: 19px;
  transform: rotate(0deg);
  transition: transform .15s ease;
}

.scene-category[open] summary::after {
  transform: rotate(90deg);
}

.scene-category summary:hover {
  background: #343737;
}

.scene-category summary b {
  font-size: 12px;
}

.scene-category summary small {
  grid-column: 3;
  grid-row: 1;
  margin-right: 18px;
  color: #aeb2b2;
  font-size: 10px;
}

.scene-category-symbol {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 6px;
  background: #442447;
  color: #f1a8f7;
  font-size: 16px;
  font-weight: 800;
}

.scene-asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 9px 10px;
}

.tool-panel .scene-asset-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 6px;
  border: 1px solid #4b4f4f;
  border-radius: 6px;
  background: #202222;
  color: #f4f4f4;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
}

.tool-panel .scene-asset-card:hover,
.tool-panel .scene-asset-card:focus-visible {
  border-color: #c335d0;
  background: #38263c;
}

.tool-panel .scene-asset-card.loading {
  opacity: .65;
  cursor: wait;
}

.scene-asset-preview {
  display: grid;
  place-items: center;
  height: 96px;
  overflow: hidden;
  border-radius: 4px;
  background: linear-gradient(135deg, #f8fafc, #dce3e8);
}

.scene-asset-preview img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

[data-scene-category="background"] .scene-asset-preview img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.scene-category-empty {
  margin: 0;
  padding: 3px 12px 11px 46px;
  color: #909696;
  font-size: 10px;
}

.tool {
  grid-template-columns: 32px 1fr;
  justify-items: stretch;
  padding: 10px;
  border-color: #404343;
  background: #2a2c2c;
  color: #f0f0f0;
  font-size: 12px;
  text-align: left;
}

.tool > b {
  display: grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  font-size: 22px;
  line-height: 1;
}

.tool > b svg {
  width: 27px;
  height: 27px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool.active,
.tool:hover {
  border-color: #b522c4;
  background: #3b2940;
  color: #fff;
}

.tool-panel .field,
.tool-panel .video-format-note {
  color: #d2d2d2;
}

.tool-panel .field input,
.tool-panel .field select,
.tool-panel button:not(.tool,.tool-drawer-close),
.paint-controls {
  border-color: #505353;
  background: #2b2d2d;
  color: #fff;
}

.tool-panel .upload-card {
  border-color: #787c7d;
  background: #292b2b;
  color: #f04de0;
}

.tool-panel .upload-card small,
.tool-panel .range-field output {
  color: #d0d2d3;
}

.pdf-import-status {
  min-height: 34px;
  margin: 2px 0 0;
  color: #b9bec2;
  font-size: 11px;
  line-height: 1.45;
}

.pdf-import-status[data-state="error"] {
  color: #ff9c9c;
}

.pdf-import-status[data-state="complete"] {
  color: #8ee7aa;
}

#pdf-upload-card[aria-busy="true"] {
  cursor: progress;
  opacity: .68;
  pointer-events: none;
}

.tool-panel-heading p,
.hand-tool-note {
  margin: -5px 2px 8px;
  color: #aeb3b8;
  font-size: 11px;
  line-height: 1.45;
}

.hand-style-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.hand-style-choices button {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 5px !important;
  border: 1px solid #5b5f60 !important;
  border-radius: 6px;
  background: #303232 !important;
  color: #fff;
  cursor: pointer;
}

.hand-style-choices button:last-child {
  grid-column: 1 / -1;
}

.hand-style-choices button > span {
  display: grid;
  place-items: center;
  height: 76px;
  overflow: hidden;
  border-radius: 4px;
  background: #f7f7f7;
}

.hand-style-choices img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hand-style-choices b {
  padding: 1px 3px 3px;
  font-size: 11px;
  text-align: left;
}

.hand-style-choices button[aria-checked="true"] {
  border-color: #12b9d7 !important;
  box-shadow: inset 0 0 0 1px #12b9d7;
  color: #18c6e7;
}

.hand-tool-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 8px;
}

.hand-tool-note {
  margin-top: 2px;
  padding: 9px;
  border-left: 2px solid #12b9d7;
  background: #252727;
}

.workspace {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 0;
  overflow: hidden;
  background: var(--ui-workspace);
}

.panel-edge-toggle {
  position: absolute;
  top: 5px;
  z-index: 1120;
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  padding: 0;
  border: 1px solid #55595b;
  border-radius: 7px;
  background: #191b1ce8;
  color: #fff;
  box-shadow: 0 6px 18px #0006;
  font-size: 38px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.panel-edge-toggle-left {
  left: 8px;
}

.panel-edge-toggle-right {
  right: 8px;
}

.panel-edge-toggle:hover,
.panel-edge-toggle:focus-visible {
  border-color: #ef49de;
  background: #3b263ce8;
  color: #ff8bef;
}

body.full-page-preview .panel-edge-toggle {
  display: none;
}

.page-strip {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  padding: 7px 54px;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid #303334;
  background: #161718;
  color: #fff;
  scrollbar-width: thin;
}

.page-strip-heading {
  display: grid;
  min-width: 62px;
  line-height: 1.05;
}

.page-strip-heading strong { font-size: 12px; }
.page-strip-heading span { color: #9ea2a4; font-size: 10px; }

.page-navigation-controls {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 3px;
}

.page-navigation-controls label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #bfc2c4;
  font-size: 10px;
  font-weight: 750;
}

.page-navigation-controls label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.page-navigation-controls select {
  width: 104px;
  height: 34px;
  min-width: 0;
  padding: 0 24px 0 8px;
  border: 1px solid #45494a;
  border-radius: 6px;
  background: #242627;
  color: #fff;
}

.page-navigation-controls button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 34px;
  padding: 0;
  border: 1px solid #45494a;
  border-radius: 6px;
  background: #242627;
  color: #fff;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.page-navigation-controls button:hover:not(:disabled) {
  border-color: #d953db;
  background: #38263a;
}

.page-navigation-controls button:disabled,
.page-navigation-controls select:disabled {
  cursor: default;
  opacity: .4;
}

.page-list {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.page-tab {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 138px;
  max-width: 220px;
  height: 36px;
  overflow: hidden;
  border: 1px solid #45494a;
  border-radius: 6px;
  background: #242627;
  color: #e8eaea;
  cursor: pointer;
}

.page-tab.active {
  border-color: #d953db;
  box-shadow: inset 0 0 0 1px #d953db;
  background: #38263a;
}

.page-tab.playback-selected {
  border-color: #a855f7;
}

.page-playback-toggle {
  display: none;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0 0 0 6px;
  accent-color: #d953db;
  cursor: pointer;
}

.page-strip.custom-playback .page-playback-toggle {
  display: block;
}

.page-number {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  border-radius: 4px;
  background: #fff;
  color: #222;
  font-size: 11px;
  font-weight: 800;
}

.page-name {
  min-width: 42px;
  flex: 1;
  overflow: hidden;
  padding: 0 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.page-actions {
  display: flex;
  align-items: center;
  visibility: hidden;
}
.page-tab:hover .page-actions,
.page-tab.active .page-actions { visibility: visible; }
.page-tab button,
.page-add {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.page-tab button { width: 22px; height: 30px; padding: 0; }
.page-tab button:disabled { opacity: .25; cursor: default; }
.page-order { color: #b6b9ba !important; }
.playback-scope-control {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  color: #bfc2c4;
  font-size: 11px;
}
.playback-scope-control select {
  height: 34px;
  border: 1px solid #45494a;
  border-radius: 6px;
  padding: 0 26px 0 9px;
  background: #242627;
  color: #fff;
}
.playback-scope-control select:disabled { opacity: .55; }
.page-add {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 11px;
  border: 1px solid #d953db;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
}

.canvas-stage {
  position: relative;
  display: block;
  place-items: normal;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  border: 0;
  border-radius: 0;
  background: var(--ui-workspace);
}

.canvas-stage::-webkit-scrollbar { width: 12px; height: 12px; }
.canvas-stage::-webkit-scrollbar-track { background: #a7dce5; }
.canvas-stage::-webkit-scrollbar-thumb { border: 3px solid #a7dce5; border-radius: 999px; background: #6b6d6e; }

.canvas-stage::after {
  display: none;
}

.editor-shell.grid-visible .canvas-stage {
  background-color: var(--ui-workspace);
  background-image:
    linear-gradient(#69c8d755 1px, transparent 1px),
    linear-gradient(90deg, #69c8d755 1px, transparent 1px);
  background-size: 32px 32px;
}

#renderer-mount {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  overflow: hidden !important;
}

.canvas-stage:not(.previewing) .whiteboard-renderer {
  width: var(--camera-frame-width) !important;
  height: var(--camera-frame-height) !important;
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
  border: 1px solid #dc70e4;
  box-shadow: none;
  transform: translate(var(--camera-shift-x), var(--camera-shift-y));
}

.camera-frame-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  display: none;
  width: var(--camera-frame-width);
  height: var(--camera-frame-height);
  max-height: none;
  transform: translate(calc(-50% + var(--camera-shift-x)), calc(-50% + var(--camera-shift-y)));
  border: 2px solid #ed62e6;
  background: transparent;
  pointer-events: none;
  touch-action: none;
  user-select: none;
  z-index: 5;
}

.canvas-stage.camera-selected .camera-frame-guide {
  display: block;
}

.zoom-controls {
  position: absolute;
  right: 42px;
  bottom: 41px;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 38px;
  padding: 0 6px;
  border-radius: 5px;
  background: #94c6d0c9;
  color: #102127;
  z-index: 7;
}

.zoom-controls button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #122226;
  font-size: 23px;
  font-weight: 800;
}

.zoom-controls output {
  min-width: 58px;
  color: #14262d;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.stage-hint {
  display: none;
}

.properties-panel {
  position: relative;
  grid-column: 3;
  grid-row: 2 / 4;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: auto;
  max-width: none;
  padding: 0;
  overflow: hidden !important;
  border: 0;
  border-left: 1px solid #3c3c3c;
  background: var(--ui-panel);
  color: #fff;
}

.properties-panel .panel-heading {
  flex: 0 0 68px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 68px;
  margin: 0;
  padding: 0 18px;
  border-bottom: 1px solid #575757;
  background: #292929;
}

.panel-heading h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.properties-panel .icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 5px;
  margin-left: auto;
  color: #fff;
}

.properties-panel .icon-button[hidden] {
  display: none;
}

.properties-panel .icon-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.property-fields {
  flex: 1 1 auto;
  display: block;
  min-height: 0;
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: #858585 #343434;
}

.camera-properties {
  display: grid;
  gap: 27px;
}

.fit-camera-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: 100%;
  min-height: 49px;
  padding: 8px 12px;
  border: 0;
  border-radius: 4px;
  background: #484848;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.fit-camera-button svg {
  width: 25px;
  height: 25px;
}

.camera-size-grid {
  display: grid;
  grid-template-columns: 120px 120px;
  gap: 15px;
}

.camera-size-grid label,
.pause-field {
  display: grid;
  gap: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.unit-input {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 40px;
  overflow: hidden;
  border: 1px solid #777;
  border-radius: 5px;
  background: #292929;
}

.unit-input input {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 7px 0 14px;
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 17px;
  font-weight: 800;
}

.unit-input span {
  padding: 0 11px 0 4px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.output-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -17px 0 4px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.output-scale span {
  margin-right: 4px;
  font-size: 24px;
}

.pause-field {
  width: 98px;
}

.pause-input {
  width: 98px;
}

.camera-background-properties {
  display: grid;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid #4e4e4e;
}

.camera-background-properties h3,
.camera-background-properties p {
  margin: 0;
}

.camera-background-properties h3 {
  color: #fff;
  font-size: 15px;
}

.camera-background-color {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.property-fields .camera-background-color input[type="color"] {
  flex: 0 0 48px;
  width: 48px;
  height: 34px;
  padding: 2px;
  cursor: pointer;
}

.camera-background-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.camera-background-upload,
.camera-background-actions button {
  display: grid !important;
  place-items: center;
  min-width: 0;
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid #656565;
  border-radius: 5px;
  background: #353535;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  text-align: center;
  cursor: pointer;
}

.camera-background-actions button:disabled {
  cursor: default;
  opacity: .45;
}

.camera-background-fit {
  display: grid !important;
  gap: 6px;
}

.camera-background-fit[hidden] {
  display: none !important;
}

.camera-background-fit select {
  width: 100%;
}

.camera-background-properties p {
  overflow: hidden;
  color: #aeb4b8;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-section {
  gap: 11px;
  margin-bottom: 14px;
  padding: 0 0 16px;
  border-bottom-color: #4e4e4e;
}

.property-section h3 {
  color: #fff;
  font-size: 15px;
}

.property-fields label {
  color: #e0e0e0;
  font-size: 12px;
  font-weight: 650;
}

.property-fields input,
.property-fields select,
.property-fields textarea,
.property-fields button:not(.fit-camera-button) {
  border-color: #656565;
  background: #353535;
  color: #fff;
}

.entrance-animation-section {
  position: relative;
  margin: 0 -6px 16px;
  padding: 14px;
  border: 1px solid #505050;
  border-radius: 9px;
  background: #292a2d;
  box-shadow: 0 6px 18px #1115;
}

.entrance-animation-section .property-section-heading > div {
  min-width: 0;
}

.entrance-animation-section .property-section-heading h3 {
  font-size: 17px;
}

.entrance-animation-section .property-section-heading p {
  margin: 3px 0 0;
  color: #aeb3b8;
  font-size: 11px;
}

.animation-summary {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #173d45;
  color: #28c8e8;
  font-size: 10px;
  font-weight: 800;
}

.entrance-animation-section > .property-subheading,
.animation-option-block > .property-subheading {
  margin: 4px 0 0;
}

.animation-option-block > .property-subheading small {
  color: #9b9fa4;
  font-size: 10px;
  font-weight: 500;
}

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

.animation-type-card {
  display: grid;
  place-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 74px;
  padding: 8px 4px !important;
  border: 1px solid #606268 !important;
  border-radius: 6px;
  background: #37393e !important;
  color: #fff;
  cursor: pointer;
}

.animation-type-card svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.animation-type-card span {
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.animation-type-card:hover,
.animation-type-card[aria-pressed="true"] {
  border-color: #13b9d6 !important;
  background: #303e43 !important;
  color: #1ac6e6;
  box-shadow: inset 0 0 0 1px #13b9d6;
}

.animation-option-block {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding-top: 11px;
  border-top: 1px solid #47494d;
}

.object-keyframe-section {
  display: grid;
  gap: 12px;
  margin: 0 -6px 16px;
  padding: 14px;
  border: 1px solid #505050;
  border-radius: 9px;
  background: #24262a;
  box-shadow: 0 6px 18px #1115;
}

.object-keyframe-section .property-section-heading p,
.object-keyframe-help,
.object-path-presets > p,
.object-keyframe-empty {
  margin: 3px 0 0;
  color: #aeb3b8;
  font-size: 11px;
  line-height: 1.45;
}

.object-path-presets {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #45484e;
  border-radius: 7px;
  background: #2c2e33;
}

.object-path-presets > div:first-child,
.object-path-presets label,
.object-keyframe-actions,
.object-keyframe-card header,
.object-keyframe-card header button:first-child,
.object-keyframe-grid label > span {
  display: flex;
  align-items: center;
}

.object-path-presets > div:first-child,
.object-keyframe-card header {
  justify-content: space-between;
  gap: 8px;
}

.object-path-presets label {
  gap: 6px;
  font-size: 10px;
}

.object-path-presets label span,
.object-keyframe-grid label > span {
  position: relative;
}

.object-path-presets input {
  width: 76px !important;
  padding-right: 24px !important;
}

.object-path-presets i,
.object-keyframe-grid label > span i {
  position: absolute;
  right: 7px;
  color: #979ca5;
  font-size: 9px;
  font-style: normal;
  pointer-events: none;
}

.object-path-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.object-path-preset-grid button {
  min-height: 34px;
  padding: 5px !important;
  border: 1px solid #5b5f66 !important;
  border-radius: 6px;
  background: #383b41 !important;
  color: #e9fbff !important;
  font-size: 15px;
  cursor: pointer;
}

.object-path-preset-grid button:hover,
.object-path-preset-grid button:focus-visible {
  border-color: #1bc3df !important;
  color: #35d5ef !important;
  outline: none;
}

.object-path-preset-grid .object-path-tour {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 750;
}

.object-keyframe-actions {
  gap: 7px;
}

.object-keyframe-actions button {
  min-height: 36px;
  padding: 7px 9px !important;
  border: 1px solid #596069 !important;
  border-radius: 6px;
  cursor: pointer;
}

.object-keyframe-actions button:first-child {
  flex: 1;
  border-color: #148ba1 !important;
  background: #164b55 !important;
  color: #c8f7ff !important;
  font-weight: 750;
}

.object-keyframe-actions button:disabled {
  cursor: default;
  opacity: .4;
}

.object-keyframe-list {
  display: grid;
  gap: 9px;
}

.object-keyframe-card {
  display: grid;
  gap: 9px;
  padding: 9px;
  border: 1px solid #4d5158;
  border-radius: 7px;
  background: #303238;
}

.object-keyframe-card header button {
  border: 0 !important;
  background: transparent !important;
  cursor: pointer;
}

.object-keyframe-card header button:first-child {
  gap: 6px;
  padding: 0 !important;
  color: #d9faff !important;
  font-size: 11px;
  font-weight: 800;
}

.object-keyframe-card header button:first-child span {
  color: #22c7e3;
}

.object-keyframe-card header button:last-child {
  width: 26px;
  height: 26px;
  padding: 0 !important;
  border: 1px solid #5b5f66 !important;
  border-radius: 50%;
  color: #eab8c1 !important;
  font-size: 17px;
}

.object-keyframe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.object-keyframe-grid label {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: #c6c9cf;
  font-size: 9px;
}

.object-keyframe-grid input,
.object-keyframe-grid select {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 4px 6px;
  border: 1px solid #5b5f66;
  border-radius: 5px;
  background: #25272b;
  color: #fff;
}

.object-keyframe-grid label > span input {
  padding-right: 27px;
}

.object-keyframe-grid .object-keyframe-color {
  grid-column: 1 / -1;
}

.object-keyframe-grid input[type="color"] {
  padding: 3px;
}

.object-keyframe-empty {
  padding: 12px;
  border: 1px dashed #555a62;
  border-radius: 6px;
  text-align: center;
}

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

.animation-actor-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 4px !important;
  border: 1px solid #606268 !important;
  border-radius: 6px;
  background: #37393e !important;
  cursor: pointer;
}

.animation-actor-card > span {
  display: grid;
  place-items: center;
  height: 58px;
  overflow: hidden;
  border-radius: 4px;
  background: #f7f7f7;
}

.animation-actor-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.animation-actor-card .animation-actor-none {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #667085;
  stroke-linecap: round;
  stroke-width: 3;
}

.animation-actor-card b {
  overflow: hidden;
  color: #fff;
  font-size: 9px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.animation-actor-card[aria-pressed="true"] {
  border-color: #13b9d6 !important;
  box-shadow: inset 0 0 0 1px #13b9d6;
}

.animation-actor-card[aria-pressed="true"] b {
  color: #1ac6e6;
}

.animation-hand-side {
  display: grid;
  grid-template-columns: 1fr minmax(110px, 1fr);
  align-items: center;
  gap: 10px;
}

.animation-direction-grid {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(3, 50px);
  justify-content: center;
  gap: 6px;
}

.animation-direction-button,
.animation-direction-object {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border: 1px solid #606268;
  border-radius: 5px;
  background: #37393e;
}

.animation-direction-button {
  padding: 8px !important;
  cursor: pointer;
}

.animation-direction-button svg {
  width: 27px;
  height: 27px;
  transform: rotate(var(--direction-rotation));
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.animation-direction-button[aria-pressed="true"] {
  border-color: #13b9d6 !important;
  background: #303e43 !important;
  color: #1ac6e6;
  box-shadow: inset 0 0 0 1px #13b9d6;
}

.animation-direction-button[data-animation-direction="top-left"] { grid-column: 1; grid-row: 1; }
.animation-direction-button[data-animation-direction="top"] { grid-column: 2; grid-row: 1; }
.animation-direction-button[data-animation-direction="top-right"] { grid-column: 3; grid-row: 1; }
.animation-direction-button[data-animation-direction="left"] { grid-column: 1; grid-row: 2; }
.animation-direction-button[data-animation-direction="right"] { grid-column: 3; grid-row: 2; }
.animation-direction-button[data-animation-direction="bottom-left"] { grid-column: 1; grid-row: 3; }
.animation-direction-button[data-animation-direction="bottom"] { grid-column: 2; grid-row: 3; }
.animation-direction-button[data-animation-direction="bottom-right"] { grid-column: 3; grid-row: 3; }

.animation-direction-object {
  grid-column: 2;
  grid-row: 2;
  border-color: #8c6252;
  background: #f2b18e;
  color: #42251b;
  font-size: 20px;
  font-weight: 900;
}

.animation-legacy-hand-control {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Fast, consistent object editing for shapes, text and pen paths. */
.property-quick-edit {
  gap: 10px;
  margin: -4px -6px 16px;
  padding: 14px;
  border: 1px solid #505050;
  border-radius: 9px;
  background: #272727;
  box-shadow: 0 6px 18px #1116;
}

.property-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.property-section-heading h3 {
  min-width: 0;
  margin: 0;
}

.property-object-kind {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid #555d67;
  border-radius: 999px;
  background: #34383d;
  color: #bfc8d2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.property-subheading {
  margin: 4px 0 -2px;
  color: #aeb6c0;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.property-transform-grid {
  gap: 8px;
}

.property-fields .property-transform-grid label,
.property-fields .property-wide-control,
.property-fields .property-color-native {
  gap: 5px;
  color: #d9dde2;
  font-size: 11px;
}

.property-transform-grid input,
.property-wide-control input,
.property-quick-typography select {
  height: 36px;
}

.property-unit-input {
  position: relative;
  display: block;
}

.property-unit-input input {
  padding-right: 30px;
}

.property-unit-input i {
  position: absolute;
  top: 50%;
  right: 10px;
  color: #929aa3;
  font-size: 10px;
  font-style: normal;
  pointer-events: none;
  transform: translateY(-50%);
}

.property-color-controls {
  display: grid;
  gap: 10px;
}

.property-color-targets {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 4px;
  padding: 3px;
  border: 1px solid #494949;
  border-radius: 7px;
  background: #202020;
}

.property-fields .property-color-targets button {
  min-width: 0;
  min-height: 29px;
  padding: 4px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #aeb5bd;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.property-fields .property-color-targets button[aria-pressed="true"] {
  background: #4a4f56;
  color: #fff;
  box-shadow: inset 0 0 0 1px #6d747c;
}

.property-color-current {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.property-color-input {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid #656565;
  border-radius: 6px;
  background: #303030;
}

.property-fields .property-color-input input[type="color"] {
  width: 40px;
  height: 38px;
  padding: 4px;
  border: 0;
  border-right: 1px solid #5b5b5b;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.property-color-input input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.property-color-input input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 3px;
}

.property-color-input output {
  min-width: 0;
  padding: 0 10px;
  overflow: hidden;
  color: #d9dee4;
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-fields .property-color-clear {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #5c6268;
  border-radius: 6px;
  background: #363a3e;
  color: #d5dae0;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.property-fields .property-color-clear:disabled {
  color: #858a90;
  cursor: default;
  opacity: .62;
}

.property-color-palette {
  display: grid;
  grid-template-columns: repeat(5, 30px);
  justify-content: center;
  gap: 7px;
  padding: 10px;
  border: 1px solid #464a4e;
  border-radius: 8px;
  background: #202224;
}

.property-fields .property-color-palette button {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 2px solid #303438;
  border-radius: 50%;
  background: var(--property-color);
  box-shadow: 0 0 0 1px #656b72;
  cursor: pointer;
  transition: transform .1s ease, box-shadow .1s ease;
}

.property-fields .property-color-palette button:hover {
  z-index: 1;
  transform: scale(1.13);
  box-shadow: 0 0 0 2px #fff;
}

.property-fields .property-color-palette button[aria-pressed="true"] {
  box-shadow: 0 0 0 2px #f05ade, 0 0 0 4px #272727;
}

.property-fields .property-color-palette button[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  inset: 7px 9px 8px 8px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  filter: drop-shadow(0 1px 1px #000c);
  transform: rotate(45deg);
}

.property-width-control {
  width: calc(50% - 4px);
}

.property-quick-typography {
  display: grid;
  gap: 9px;
  margin-top: 2px;
  padding-top: 9px;
  border-top: 1px solid #444;
}

.property-advanced-section {
  gap: 10px;
}

.property-fields .property-inline-action {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #5d6671;
  border-radius: 5px;
  background: #373c42;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 1150px) {
  .property-color-palette {
    grid-template-columns: repeat(5, 28px);
    gap: 6px;
  }

  .property-fields .property-color-palette button {
    width: 28px;
    height: 28px;
  }
}

.creation-quick-edit {
  gap: 12px;
}

.creation-note {
  margin: -1px 0 2px;
  color: #abb3bd;
  font-size: 11px;
  line-height: 1.45;
}

.creation-color-controls,
.creation-control-group,
.creation-typography {
  display: grid;
  gap: 9px;
}

.creation-control-group,
.creation-range-control {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid #44484c;
}

.creation-choice-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.property-fields .creation-choice-row button {
  display: grid;
  place-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 52px;
  padding: 7px 3px;
  border: 1px solid #50555a;
  border-radius: 6px;
  background: #303336;
  color: #c8ced5;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.creation-choice-row button i {
  display: block;
  width: 24px;
  height: 0;
  border-top: var(--weight) solid currentColor;
  border-radius: 6px;
  font-style: normal;
}

.property-fields .creation-choice-row button[aria-pressed="true"],
.property-fields .creation-text-actions button[aria-pressed="true"],
.property-fields .creation-align-row button[aria-pressed="true"] {
  border-color: #e151d4;
  background: #51304f;
  color: #fff;
  box-shadow: inset 0 0 0 1px #a741a0;
}

.property-fields .creation-number-control,
.property-fields .creation-range-control,
.property-fields .creation-typography > label {
  gap: 6px;
  color: #d9dde2;
  font-size: 11px;
}

.creation-number-control {
  width: calc(50% - 3px);
}

.creation-number-control input,
.creation-typography select {
  height: 36px;
}

.creation-range-control > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
}

.property-fields .creation-range-control input[type="range"] {
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: #dc3dcc;
}

.creation-range-control output {
  color: #d8dde3;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.creation-text-actions,
.creation-align-row {
  display: grid;
  gap: 5px;
}

.creation-text-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.creation-align-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.property-fields .creation-text-actions button,
.property-fields .creation-align-row button {
  min-height: 37px;
  padding: 6px;
  border: 1px solid #50555a;
  border-radius: 6px;
  background: #303336;
  color: #cbd1d7;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.property-fields .creation-text-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.creation-text-actions button b,
.creation-text-actions button i {
  font-size: 15px;
}

.project-usage {
  flex: 0 0 286px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 25px 21px 18px;
  border-top: 1px solid #5b5b5b;
  background: #303030;
  color: #fff;
}

.usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 49px;
  align-items: center;
  gap: 12px;
}

.usage-row strong,
.project-usage p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-meter {
  position: relative;
  display: block;
  width: 49px;
  height: 6px;
  overflow: hidden;
  border-radius: 4px;
  background: #858585;
}

.usage-meter i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  border-radius: inherit;
  background: #ef39dc;
}

.project-usage hr {
  width: 100%;
  margin: 3px 0 7px;
  border: 0;
  border-top: 1px solid #777;
}

.timeline-panel {
  position: relative;
  grid-column: 1 / 3;
  grid-row: 3;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 12px 16px 0;
  overflow: hidden;
  border: 0;
  border-top: 1px solid #292b2b;
  background: var(--ui-black);
  color: #fff;
}

.timeline-resize {
  top: -4px;
}

.timeline-toolbar {
  display: flex;
  align-items: center;
  height: 39px;
  gap: 12px;
}

.timeline-mode {
  display: flex;
  align-items: center;
  height: 29px;
  overflow: hidden;
  border-radius: 16px;
  background: #777;
}

.timeline-mode button {
  height: 29px;
  padding: 0 10px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.timeline-mode button.active {
  background: #f4f4f4;
  color: #333;
}

.timeline-toolbar > #timeline-time {
  display: none;
  color: #b9b9b9;
  font-size: 12px;
}

.timeline-playback {
  display: none;
  gap: 5px;
  margin-left: auto;
}

.timeline-trim-actions {
  display: none;
  align-items: center;
  gap: 4px;
}

.timeline-toolbar .timeline-trim-actions button {
  min-height: 26px;
  padding: 0 8px;
  border-color: #5c465e;
  background: #312534;
  color: #f5ddf7;
  white-space: nowrap;
}

.timeline-toolbar .timeline-trim-actions button:hover:not(:disabled) {
  border-color: #d43adb;
  background: #4b284e;
}

.timeline-toolbar .timeline-trim-actions button:disabled {
  opacity: .35;
  cursor: default;
}

.timeline-toolbar .timeline-playback button {
  width: 29px;
  height: 26px;
  padding: 0;
  border-color: #454747;
  background: #242626;
}

.timeline-toolbar .timeline-playback .timeline-play {
  border-color: #9221a0;
  background: #9221a0;
}

.timeline-toolbar label {
  display: none;
  margin-left: 0;
}

.timeline-toolbar .timeline-chevron {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 32px;
  margin-left: auto;
  padding: 0;
  border: 1px solid #454747;
  border-radius: 5px;
  background: #242626;
  color: #fff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.timeline-content {
  display: flex;
  gap: 0;
  height: calc(100% - 39px);
  min-height: 0;
}

.timeline-scroll {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  overflow-x: scroll;
  overflow-y: auto;
  scrollbar-color: #8b8b8b #202222;
}

.timeline-panel.timeline-fit-all .timeline-scroll {
  overflow-x: hidden;
}

.time-ruler {
  display: none;
  height: 24px;
  margin-left: var(--timeline-label-width);
  border-color: #363838;
  background: repeating-linear-gradient(90deg, transparent 0, transparent 49px, #313333 50px);
  color: #aeb2b4;
}

.timeline-playhead {
  display: none;
}

.timeline-panel.advanced-timeline .time-ruler,
.timeline-panel.advanced-timeline .timeline-playhead,
.timeline-panel.advanced-timeline .timeline-playback,
.timeline-panel.advanced-timeline .timeline-trim-actions,
.timeline-panel.advanced-timeline .timeline-toolbar label,
.timeline-panel.advanced-timeline .timeline-toolbar > #timeline-time {
  display: flex;
}

.timeline-panel.advanced-timeline .time-ruler,
.timeline-panel.advanced-timeline .timeline-playhead,
.timeline-panel.advanced-timeline .timeline-toolbar > #timeline-time {
  display: block;
}

.timeline-rows {
  gap: 3px;
}

.timeline-row {
  grid-template-columns: var(--timeline-label-width) minmax(0, 1fr);
}

.timeline-label {
  border-color: #353838;
  color: #e1e2e2;
}

.timeline-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-order-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  margin-left: auto;
}

.timeline-label .timeline-order-button {
  display: grid;
  place-items: center;
  width: 21px;
  height: 22px;
  padding: 0;
  border: 1px solid #4c4f50;
  border-radius: 4px;
  background: #252727;
  color: #f2f2f2;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.timeline-label .timeline-order-button:hover:not(:disabled) {
  border-color: #d43adb;
  background: #3a243b;
}

.timeline-label .timeline-order-button:disabled {
  opacity: .3;
  cursor: default;
}

.timeline-label.selected {
  background: #29222b;
  color: #fff;
}

.timeline-lane {
  background: repeating-linear-gradient(90deg, transparent 0, transparent 49px, #292b2b 50px);
}

.timeline-animation-segment {
  background: #ad11b9;
}

.timeline-trim-handle {
  position: absolute;
  top: 0;
  z-index: 5;
  width: 9px;
  height: 100%;
  border: 1px solid #fff;
  background: #f0b7f5;
  cursor: ew-resize;
  opacity: .58;
  touch-action: none;
}

.timeline-trim-start {
  left: 0;
  border-radius: 4px 0 0 4px;
}

.timeline-trim-end {
  right: 0;
  border-radius: 0 4px 4px 0;
}

.timeline-row.selected .timeline-trim-handle,
.timeline-clip:hover .timeline-trim-handle {
  opacity: 1;
}

.timeline-row.selected .timeline-clip {
  box-shadow: 0 0 0 2px #e253ec;
}

@media (max-width: 1050px) {
  .timeline-toolbar .timeline-trim-actions button[data-action="trim-start"],
  .timeline-toolbar .timeline-trim-actions button[data-action="trim-end"] {
    display: none;
  }
}

.editor-shell.toolbox-hidden {
  grid-template-columns: 0 minmax(0, 1fr) var(--properties-width);
}

.editor-shell.properties-hidden {
  grid-template-columns: var(--toolbox-width) minmax(0, 1fr) var(--properties-collapsed-width);
}

.editor-shell.toolbox-hidden.properties-hidden {
  grid-template-columns: 0 minmax(0, 1fr) var(--properties-collapsed-width);
}

.editor-shell.toolbox-hidden .left-sidebar {
  display: none;
}

.editor-shell.timeline-hidden {
  grid-template-rows: 138px minmax(0, 1fr) var(--timeline-collapsed-height);
}

.editor-shell.properties-hidden .properties-panel {
  display: flex;
}

.editor-shell.properties-hidden .properties-panel .panel-heading {
  justify-content: center;
  padding: 0;
}

.editor-shell.properties-hidden .panel-heading h2,
.editor-shell.properties-hidden .properties-panel .icon-button,
.editor-shell.properties-hidden .property-fields,
.editor-shell.properties-hidden .project-usage {
  display: none;
}

.editor-shell.timeline-hidden .timeline-panel {
  display: block;
  padding: 0 16px;
}

.editor-shell.timeline-hidden .timeline-toolbar {
  height: calc(var(--timeline-collapsed-height) - 1px);
}

.editor-shell.timeline-hidden .timeline-toolbar > :not(.timeline-chevron),
.editor-shell.timeline-hidden .timeline-content,
.editor-shell.timeline-hidden .timeline-resize {
  display: none !important;
}

.editor-shell.timeline-hidden .timeline-chevron {
  margin-left: auto;
}

.editor-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: min(520px, 90vw);
  padding: 10px 15px;
  transform: translateX(-50%);
  border: 1px solid #595b5b;
  border-radius: 6px;
  background: #202222;
  color: #fff;
  box-shadow: 0 12px 28px #0008;
}

body.full-page-preview .editor-shell,
body.full-page-preview .editor-body {
  display: block;
  height: 100%;
}

body.full-page-preview .workspace {
  height: 100%;
}

body.full-page-preview .page-strip { display: none !important; }
body.full-page-preview .workspace { grid-template-rows: minmax(0, 1fr); }

.canvas-stage.previewing .camera-frame-guide,
body.full-page-preview .camera-frame-guide {
  display: none !important;
}

.canvas-stage.previewing {
  overflow: hidden;
  scrollbar-gutter: auto;
}

.canvas-stage.previewing #renderer-mount,
body.full-page-preview #renderer-mount {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.canvas-stage.previewing .whiteboard-renderer,
body.full-page-preview .whiteboard-renderer {
  overflow: hidden !important;
  border-color: transparent;
  transform: translate(0, 0);
}

.selection-member-box {
  fill: transparent;
  stroke: #8b5cf6;
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.multi-selection-box {
  fill: #8b5cf60d;
  stroke: #7c3aed;
  stroke-width: 2;
  stroke-dasharray: 8 5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.multi-selection-label {
  fill: #fff;
  stroke: #7c3aed;
  stroke-width: 8;
  paint-order: stroke;
  font: 700 13px Inter, ui-sans-serif, sans-serif;
  pointer-events: none;
}

.selection-marquee {
  fill: #7c3aed1f;
  stroke: #7c3aed;
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

@media (max-width: 1450px) {
  :root {
    --properties-width: 310px;
  }

  .top-toolbox {
    gap: 9px;
  }

  .account-project-controls {
    max-width: calc(100vw - 24px);
  }

  .brand input,
  #project-title {
    width: 165px;
  }

  .video-format-control select {
    width: 140px;
  }

  .download-button {
    min-width: 145px;
    padding-inline: 14px;
    font-size: 17px;
  }

  .preview-cluster button {
    width: 43px;
  }

  .usage-row strong,
  .project-usage p {
    font-size: 13px;
  }
}

@media (max-width: 1120px) {
  :root {
    --toolbox-width: 82px;
    --properties-width: 270px;
    --timeline-height: 220px;
    --timeline-label-width: 125px;
  }

  .editor-shell {
    grid-template-rows: 112px minmax(0, 1fr) var(--timeline-height);
  }

  .editor-shell.timeline-hidden {
    grid-template-rows: 112px minmax(0, 1fr) var(--timeline-collapsed-height);
  }

  .account-project-controls {
    top: 7px;
  }

  .brand input,
  #project-title {
    width: 150px;
    font-size: 14px;
  }

  .auth-button {
    min-width: 82px;
  }

  .video-format-control > span,
  .video-format-control output {
    display: none;
  }

  .video-format-control select {
    width: 130px;
  }

  .top-toolbox,
  .topbar-cta {
    bottom: 12px;
  }

  .top-toolbox {
    left: 10px;
    gap: 4px;
  }

  .top-toolbox button {
    width: 30px;
    height: 30px;
  }

  .topbar-cta {
    right: 10px;
  }

  .help-button {
    display: none;
  }

  .sidebar-tabs {
    padding-inline: 8px;
  }

  .sidebar-tabs button {
    width: 66px;
    flex-basis: 69px;
    font-size: 12px;
  }

  .tool-panels {
    width: 235px;
  }

  .project-usage {
    flex-basis: 255px;
    padding-inline: 15px;
  }
}

@media (max-width: 760px) {
  :root {
    --toolbox-width: 74px;
    --properties-width: min(310px, 82vw);
    --timeline-height: 175px;
    --timeline-label-width: 110px;
  }

  .editor-shell {
    grid-template-columns: var(--toolbox-width) minmax(0, 1fr);
    grid-template-rows: 96px minmax(0, 1fr) var(--timeline-height);
  }

  .editor-shell.timeline-hidden {
    grid-template-columns: var(--toolbox-width) minmax(0, 1fr);
    grid-template-rows: 96px minmax(0, 1fr) var(--timeline-collapsed-height);
  }

  .appbar {
    display: block;
    height: auto;
    padding: 0;
    overflow: hidden;
  }

  .account-project-controls {
    top: 5px;
    left: 8px;
    transform: none;
  }

  .auth-button {
    min-width: 40px;
    width: 40px;
    padding: 0 8px;
  }

  .auth-button span,
  .video-format-control {
    display: none;
  }

  .brand input,
  #project-title {
    width: 125px;
    text-align: left;
  }

  .top-toolbox {
    max-width: calc(100% - 145px);
    overflow: hidden;
  }

  .top-toolbox button:nth-of-type(n+7),
  .top-tool-divider {
    display: none;
  }

  .topbar-cta {
    right: 8px;
  }

  .preview-cluster,
  .download-button {
    height: 40px;
  }

  .preview-cluster button {
    width: 39px;
    height: 40px;
  }

  .download-button {
    min-width: 0;
    width: 44px;
    padding: 10px;
    overflow: hidden;
    color: transparent;
    gap: 0;
  }

  .download-button svg {
    flex: 0 0 24px;
    color: #fff;
  }

  .left-sidebar {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    width: auto;
    box-shadow: none;
  }

  .workspace {
    grid-column: 2;
    grid-row: 2;
  }

  .properties-panel {
    position: absolute;
    top: 96px;
    right: 0;
    bottom: 0;
    z-index: 50;
    width: var(--properties-width);
    box-shadow: -15px 0 35px #0007;
  }

  .timeline-panel {
    grid-column: 1 / 3;
    grid-row: 3;
  }

  .timeline-toolbar label,
  .timeline-toolbar > #timeline-time,
  .timeline-playback {
    display: none;
  }

  .zoom-controls {
    right: 15px;
    bottom: 15px;
  }

  .editor-shell.properties-hidden .properties-panel {
    display: flex;
    bottom: auto;
    width: var(--properties-collapsed-width);
    height: 68px;
    box-shadow: -6px 4px 18px #0006;
  }
}

/* Editing fullscreen keeps authoring controls available while giving the
   camera the full viewport height. It is deliberately separate from the
   read-only full-page preview, which hides the inspector and selection UI. */
.fullscreen-editor-toolbar {
  display: none;
}

.fullscreen-editor-toolbar::-webkit-scrollbar {
  display: none;
}

.fullscreen-editor-toolbar button {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #f7f7f7;
  cursor: pointer;
}

.fullscreen-editor-toolbar button:hover,
.fullscreen-editor-toolbar button.active,
.fullscreen-editor-toolbar button[aria-pressed="true"] {
  background: #343738;
  color: #3dd6ef;
}

.fullscreen-editor-toolbar svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fullscreen-toolbar-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 26px;
  margin: 0 3px;
  background: #4a4e50;
}

.fullscreen-project-controls {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  gap: 8px;
}

.fullscreen-editor-toolbar button:disabled {
  cursor: default;
  opacity: .4;
}

.fullscreen-project-controls label {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  color: #bfc3c5;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.fullscreen-project-controls input,
.fullscreen-project-controls select {
  height: 36px;
  min-width: 0;
  border: 1px solid #4a4e50;
  border-radius: 6px;
  background: #252829;
  color: #fff;
}

.fullscreen-project-controls input {
  width: 105px;
  flex: 0 0 105px;
  padding: 0 9px;
}

.fullscreen-project-controls select {
  width: 112px;
  flex: 0 0 112px;
  padding: 0 25px 0 8px;
}

.fullscreen-project-controls output {
  display: none;
}

@media (max-width: 620px) {
  .fullscreen-project-controls label > span {
    display: none;
  }

  .fullscreen-project-controls input {
    width: 94px;
  }

  .fullscreen-project-controls select {
    width: 104px;
  }

}

/* The editor keeps the camera-first composition in the browser window. */
.window-toolbar-only {
  display: none !important;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) {
  --window-properties-width: clamp(220px, 18vw, 270px);
  --window-properties-gap: 10px;
  --window-inspector-width: calc(var(--window-properties-width) + var(--window-properties-gap));
  --window-toolbar-height: 66px;
  position: relative;
  grid-template-columns: var(--toolbox-width) minmax(0, 1fr) var(--window-inspector-width);
  grid-template-rows: minmax(0, 1fr) 0 var(--window-toolbar-height);
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--ui-workspace);
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen):not(.timeline-hidden) {
  grid-template-rows: minmax(0, 1fr) var(--timeline-height) var(--window-toolbar-height);
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen).toolbox-hidden {
  grid-template-columns: 0 minmax(0, 1fr) var(--window-inspector-width);
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen).properties-hidden {
  --window-properties-width: 0px;
  --window-properties-gap: 0px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen).properties-hidden .properties-panel {
  display: none !important;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .appbar {
  display: none !important;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .editor-body {
  display: contents;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .left-sidebar {
  grid-column: 1;
  grid-row: 1;
  display: block;
  min-height: 0;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen).toolbox-hidden .left-sidebar {
  display: none;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .workspace {
  grid-column: 2;
  grid-row: 1;
  grid-template-rows: 52px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .canvas-stage {
  min-height: 0;
  overflow: hidden;
  border: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .canvas-stage::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .properties-panel {
  position: relative;
  inset: auto;
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  width: var(--window-properties-width);
  height: 100%;
  min-height: 0;
  margin-left: var(--window-properties-gap);
  box-shadow: -10px 0 28px #0d2e3530;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .properties-panel .panel-heading {
  flex-basis: 60px;
  min-height: 60px;
  padding-inline: 14px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .properties-panel .panel-heading h2 {
  font-size: 17px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .property-fields {
  width: 100%;
  padding: 14px;
  font-size: 12px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .property-fields > *,
body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .property-section,
body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .property-grid,
body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .camera-properties {
  min-width: 0;
  max-width: 100%;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .camera-properties {
  gap: 19px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fit-camera-button {
  min-height: 44px;
  gap: 8px;
  padding: 7px 9px;
  font-size: 12px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fit-camera-button svg {
  width: 21px;
  height: 21px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .camera-size-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .camera-size-grid label,
body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .pause-field {
  min-width: 0;
  gap: 6px;
  font-size: 12px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .unit-input {
  width: 100%;
  height: 36px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .unit-input input {
  min-width: 0;
  padding: 0 3px 0 8px;
  font-size: 14px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .unit-input span {
  flex: 0 0 auto;
  padding: 0 7px 0 2px;
  font-size: 11px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .output-scale {
  margin-top: -10px;
  font-size: 11px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .property-color-palette {
  grid-template-columns: repeat(5, 26px);
  gap: 5px;
  padding: 8px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .property-fields .property-color-palette button {
  width: 26px;
  height: 26px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .animation-direction-grid {
  grid-template-columns: repeat(3, 50px);
  grid-template-rows: repeat(3, 46px);
  gap: 5px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .timeline-panel {
  grid-column: 1 / 3;
  grid-row: 2;
  display: block;
  min-height: 0;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen).timeline-hidden .timeline-panel {
  display: none !important;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar {
  position: relative;
  inset: auto;
  grid-column: 1 / -1;
  grid-row: 3;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 3px;
  width: auto;
  min-width: 0;
  min-height: 66px;
  max-width: none;
  padding: 9px 10px;
  overflow-x: auto;
  border: 0;
  border-top: 1px solid #45494a;
  border-radius: 0;
  background: #111313;
  color: #fff;
  box-shadow: 0 10px 28px #0006;
  scrollbar-width: none;
  backdrop-filter: blur(8px);
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar > button {
  flex-basis: 32px;
  width: 32px;
  height: 36px;
  padding: 6px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar .window-toolbar-only:not([hidden]) {
  display: grid !important;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar .fullscreen-toolbar-divider.window-toolbar-only {
  display: block !important;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar .window-toolbar-only[hidden] {
  display: none !important;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar .window-playback-control {
  padding: 2px;
  color: #eaf8fb;
  font-size: 18px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar .toolbar-auth-button span {
  display: none;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar .window-export-button {
  color: #3dd6ef;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar .window-help-button {
  padding: 0;
  font-size: 18px;
  font-weight: 850;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .full-preview-playback {
  display: none !important;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .zoom-controls {
  right: 14px;
  bottom: 18px;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .editor-toast {
  bottom: 76px;
}

@media (min-width: 1100px) {
  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar .toolbar-auth-button {
    grid-template-columns: 18px auto;
    gap: 6px;
    width: auto;
    min-width: 78px;
    padding-inline: 8px;
    flex-basis: auto;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar .toolbar-auth-button span {
    display: inline !important;
    font-size: 12px;
    font-weight: 800;
  }
}

@media (max-width: 900px) {
  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) {
    --toolbox-width: 74px;
    --window-properties-width: min(250px, 38vw);
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .left-sidebar,
  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .properties-panel {
    position: relative;
    inset: auto;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .tool-panels {
    width: 230px;
  }
}

@media (max-width: 1200px) {
  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) {
    --window-toolbar-height: 114px;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar {
    align-content: center;
    flex-wrap: wrap;
    row-gap: 3px;
    overflow-x: hidden;
    overflow-y: auto;
  }
}

@media (max-width: 800px) {
  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) {
    --window-toolbar-height: 124px;
  }
}

@media (max-width: 620px) {
  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) {
    --toolbox-width: 64px;
    --window-properties-width: min(240px, 64vw);
    --window-toolbar-height: 154px;
    grid-template-columns: var(--toolbox-width) minmax(0, 1fr);
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .properties-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: var(--window-toolbar-height);
    z-index: 1070;
    width: min(310px, 82vw);
    height: auto;
    margin-left: 0;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen).properties-hidden .properties-panel {
    top: 0;
    bottom: auto;
    width: var(--properties-collapsed-width);
    height: 60px;
  }

  .page-strip-heading,
  .playback-scope-control > span {
    display: none;
  }

  .page-add {
    width: 38px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .page-add::before {
    content: "+";
    font-size: 22px;
    line-height: 1;
  }

}

@media (max-width: 420px) {
  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) {
    --window-toolbar-height: 212px;
  }
}

/* Panel visibility and phone camera layout. */
.bottom-toolbar-restore {
  display: none;
}

.bottom-toolbar-restore {
  align-items: center;
  justify-content: center;
  border: 1px solid #55595b;
  background: #191b1c;
  color: #fff;
  cursor: pointer;
}

.bottom-toolbar-restore svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen).bottom-toolbar-hidden {
  --window-toolbar-height: 0px;
}

.editor-shell.bottom-toolbar-hidden .fullscreen-editor-toolbar {
  display: none !important;
}

body:not(.full-page-preview) .editor-shell.bottom-toolbar-hidden .bottom-toolbar-restore {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 1400;
  display: flex;
  gap: 7px;
  min-height: 42px;
  padding: 7px 12px;
  transform: translateX(-50%);
  border-radius: 999px;
  box-shadow: 0 8px 24px #0007;
  font-size: 12px;
  font-weight: 800;
}

body.full-page-preview .bottom-toolbar-restore {
  display: none !important;
}

@media (max-width: 900px), (any-pointer: coarse) {
  .panel-edge-toggle {
    top: max(4px, env(safe-area-inset-top));
    width: 44px;
    height: 44px;
    font-size: 40px;
    touch-action: manipulation;
  }

  .panel-edge-toggle-left {
    left: max(8px, env(safe-area-inset-left));
  }

  .panel-edge-toggle-right {
    right: max(8px, env(safe-area-inset-right));
  }

  body:not(.full-page-preview) .bottom-toolbar-restore {
    display: none !important;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) {
    --toolbox-width: 0px;
    --window-properties-width: 0px;
    --window-properties-gap: 0px;
    --window-toolbar-height: 66px;
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen).bottom-toolbar-hidden {
    --window-toolbar-height: 0px;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .workspace {
    grid-column: 1 / -1;
  }

  .editor-shell .page-strip {
    padding-right: max(56px, env(safe-area-inset-right));
    padding-left: max(56px, env(safe-area-inset-left));
    scroll-padding-right: max(56px, env(safe-area-inset-right));
    scroll-padding-left: max(56px, env(safe-area-inset-left));
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .left-sidebar {
    position: absolute;
    inset: 0 auto 66px 0;
    z-index: 1060;
    display: block;
    width: 64px;
    box-shadow: 10px 0 28px #0007;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .sidebar-tabs {
    padding-top: calc(env(safe-area-inset-top) + 62px);
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .properties-panel .panel-heading {
    padding-right: calc(max(56px, env(safe-area-inset-right)) + 8px);
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen).bottom-toolbar-hidden .left-sidebar {
    bottom: 0;
  }

  body:not(.full-page-preview) .editor-shell.toolbox-hidden .left-sidebar {
    display: none;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .properties-panel {
    position: absolute;
    inset: 0 0 66px auto;
    z-index: 1070;
    width: min(310px, 84vw);
    height: auto;
    margin: 0;
    box-shadow: -12px 0 30px #0008;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen).bottom-toolbar-hidden .properties-panel {
    bottom: 0;
  }

  body:not(.full-page-preview) .editor-shell.properties-hidden .properties-panel {
    display: none !important;
  }

  body:not(.full-page-preview) .editor-shell .tool-panels {
    width: min(250px, calc(100vw - 64px));
  }

  body:not(.full-page-preview) .editor-shell .tool-drawer-close {
    position: absolute;
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    z-index: 10;
    width: 32px;
    height: 32px;
    margin: 0;
    border-radius: 50%;
    background: #373939;
    font: 400 18px/1 Arial, sans-serif;
    touch-action: manipulation;
  }

  body:not(.full-page-preview) .editor-shell .tool-panel h2 {
    min-height: 32px;
    margin-right: 42px;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar {
    align-content: center;
    flex-wrap: nowrap;
    gap: 4px;
    min-height: 66px;
    padding: 9px max(10px, env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar > button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 10px;
    scroll-snap-align: start;
    touch-action: manipulation;
  }

  .fullscreen-project-controls input,
  .fullscreen-project-controls select {
    height: 44px;
  }

}

/* Laptop and desktop toolbars keep every command on one labelled row. */
@media (min-width: 901px) {
  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) {
    --window-toolbar-height: 66px;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar {
    align-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #747a7c #1a1c1d;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar > button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 5px;
    width: auto;
    min-width: 54px;
    height: 36px;
    padding: 6px 8px;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar > button > svg {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
  }

  .fullscreen-editor-toolbar .bottom-tool-icon {
    display: grid;
    place-items: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 1;
  }

  .fullscreen-editor-toolbar .bottom-tool-label {
    display: inline-block !important;
    color: currentColor;
    font-size: 10px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar::-webkit-scrollbar {
    display: block;
    height: 9px;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar::-webkit-scrollbar-track {
    background: #1a1c1d;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar::-webkit-scrollbar-thumb {
    border: 2px solid #1a1c1d;
    border-radius: 999px;
    background: #747a7c;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar::-webkit-scrollbar-thumb:hover {
    background: #a1a6a8;
  }
}

@media (max-width: 900px), (any-pointer: coarse) {
  .fullscreen-editor-toolbar .bottom-tool-label {
    display: none !important;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar > button {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    gap: 0;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 10px;
  }

  body:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .fullscreen-editor-toolbar > button > svg {
    width: 100%;
    height: 100%;
  }

  .fullscreen-editor-toolbar .bottom-tool-icon {
    width: 24px;
    height: 24px;
  }
}

/* Imported PDF pages use their native page ratio, fill the editing width, and
   turn the canvas stage into the scroll container as the page grows. */
body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  scrollbar-width: auto;
  scrollbar-color: #606365 #a7dce5;
  -ms-overflow-style: auto;
}

body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active::-webkit-scrollbar {
  display: block;
  width: 18px;
  height: 18px;
}

body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active::-webkit-scrollbar-thumb {
  border-width: 4px;
  min-width: 44px;
  min-height: 44px;
}

body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active.pdf-scrollbar-dragging,
body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active.pdf-scrollbar-dragging #editor-overlay {
  cursor: grabbing !important;
}

body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active.pdf-hand-ready,
body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active.pdf-hand-tool-active,
body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active.pdf-hand-ready #renderer-mount,
body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active.pdf-hand-tool-active #renderer-mount,
body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active.pdf-hand-ready #editor-overlay,
body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active.pdf-hand-tool-active #editor-overlay {
  cursor: grab !important;
}

body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active.pdf-hand-dragging,
body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active.pdf-hand-dragging #renderer-mount,
body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active.pdf-hand-dragging #editor-overlay {
  cursor: grabbing !important;
  user-select: none;
}

body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active.pdf-hand-dragging .drawing-tool-cursor {
  display: none !important;
}

.fullscreen-editor-toolbar .pdf-hand-button[hidden] {
  display: none !important;
}

.pdf-scrollbar-control {
  position: fixed;
  z-index: 24;
  display: block;
  overflow: hidden;
  border: 0;
  background: #a7dce5;
  touch-action: none;
  user-select: none;
  cursor: pointer;
}

.pdf-scrollbar-control[hidden] {
  display: none !important;
}

.pdf-scrollbar-control > span {
  position: absolute;
  display: block;
  min-width: 44px;
  min-height: 44px;
  border: 4px solid #a7dce5;
  border-radius: 999px;
  background: #606365;
  pointer-events: none;
}

.pdf-scrollbar-horizontal > span {
  top: 0;
  height: 18px;
  min-height: 0;
}

.pdf-scrollbar-vertical > span {
  left: 0;
  width: 18px;
  min-width: 0;
}

.pdf-scrollbar-control:focus-visible {
  outline: 2px solid #245ec9;
  outline-offset: -2px;
}

.pdf-scrollbar-control.dragging,
.pdf-scrollbar-control.dragging > span {
  cursor: grabbing;
}

.fullscreen-video-format-control[hidden] {
  display: none !important;
}

body:not(.full-page-preview) .editor-shell .canvas-stage.pdf-page-active #renderer-mount {
  width: max(100%, var(--camera-frame-width));
  height: max(100%, var(--camera-frame-height));
  min-width: 100%;
  min-height: 100%;
  overflow: visible !important;
}

/* Playback uses the recorded PDF viewport as the camera. The SVG fills the
   player/export frame and clipping happens in its viewBox, never with UI
   scrollbars. */
.editor-shell .canvas-stage.previewing.pdf-playback-active,
body.full-page-preview .editor-shell .canvas-stage.pdf-playback-active {
  overflow: hidden !important;
  overscroll-behavior: none;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.editor-shell .canvas-stage.previewing.pdf-playback-active::-webkit-scrollbar,
body.full-page-preview .editor-shell .canvas-stage.pdf-playback-active::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.editor-shell .canvas-stage.previewing.pdf-playback-active #renderer-mount,
body.full-page-preview .editor-shell .canvas-stage.pdf-playback-active #renderer-mount {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.editor-shell .canvas-stage.previewing.pdf-playback-active .whiteboard-renderer,
body.full-page-preview .editor-shell .canvas-stage.pdf-playback-active .whiteboard-renderer {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  border: 0 !important;
  transform: none !important;
}

/* Keep local PDF playback immersive on compact and touch devices. The
   playback controls remain above the page so Pause and Stop are always
   reachable without restoring the editor chrome. */
html.mobile-pdf-playback-page,
body.mobile-pdf-playback {
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body.mobile-pdf-playback {
  position: fixed;
  inset: 0;
  margin: 0;
  background: var(--ui-workspace);
  touch-action: manipulation;
}

body.mobile-pdf-playback .editor-shell {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1200;
  display: block !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}

body.mobile-pdf-playback .editor-body,
body.mobile-pdf-playback .workspace {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.mobile-pdf-playback .canvas-stage {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  touch-action: manipulation;
}

body.mobile-pdf-playback #renderer-mount {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.mobile-pdf-playback .appbar,
body.mobile-pdf-playback .fullscreen-editor-toolbar,
body.mobile-pdf-playback .bottom-toolbar-restore,
body.mobile-pdf-playback .left-sidebar,
body.mobile-pdf-playback .properties-panel,
body.mobile-pdf-playback .timeline-panel,
body.mobile-pdf-playback .page-strip,
body.mobile-pdf-playback .panel-edge-toggle,
body.mobile-pdf-playback #editor-overlay,
body.mobile-pdf-playback .camera-frame-guide,
body.mobile-pdf-playback .zoom-controls,
body.mobile-pdf-playback .stage-hint,
body.mobile-pdf-playback .drawing-tool-cursor,
body.mobile-pdf-playback .text-toolbar,
body.mobile-pdf-playback .quick-color-palette,
body.mobile-pdf-playback .mobile-transform-toolbar,
body.mobile-pdf-playback .touch-transform-feedback,
body.mobile-pdf-playback .pdf-scrollbar-control {
  display: none !important;
}

body.mobile-pdf-playback:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .full-preview-playback {
  position: fixed;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 1400;
  display: flex !important;
  max-width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 16px);
  padding: 4px;
}

body.mobile-pdf-playback:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .full-preview-playback button {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  -webkit-tap-highlight-color: transparent;
}

body.mobile-pdf-playback .editor-toast {
  bottom: calc(74px + env(safe-area-inset-bottom));
}

@supports not (height: 100dvh) {
  html.mobile-pdf-playback-page,
  body.mobile-pdf-playback,
  body.mobile-pdf-playback .editor-shell {
    height: 100% !important;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  body.mobile-pdf-playback:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .full-preview-playback {
    bottom: max(6px, env(safe-area-inset-bottom));
    padding: 3px;
  }

  body.mobile-pdf-playback:not(.full-page-preview) .editor-shell:not(.editor-fullscreen) .full-preview-playback button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
}
