/* Shared by the collection, Burnside, Bolivar and Worthington. The editor has
   its own timeline. Keep this visitor layout independent of camera/play state. */
body:not([data-authoring=true]) #transport {
  --dock-pad: 7px;
  --dock-gap: 12px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 10px var(--dock-gap);
  width: min(1100px, calc(100% - 40px));
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--collection-space, 0px));
  min-height: 0;
  padding: var(--dock-pad);
}
/* Older skins hide, then redisplay, the dock as a block while exploring. */
body:not([data-authoring=true])[data-mode=exploring] #transport { display: grid !important; }
body:not([data-authoring=true]) #transport .transport-toggles { display: contents; }
body:not([data-authoring=true]) #transport::before {
  content: "";
  position: absolute;
  top: var(--dock-pad);
  bottom: var(--dock-pad);
  left: calc(var(--dock-pad) + 44px + var(--dock-gap) / 2);
  width: 1px;
  background: var(--line);
  pointer-events: none;
}
body:not([data-authoring=true]) #transport .transport-toggle {
  grid-column: 1;
  justify-self: center;
  align-self: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 5px;
}
body:not([data-authoring=true]) #chapter-collapse { grid-row: 1; }
body:not([data-authoring=true]) #chapter-collapse svg { width: 20px; height: 20px; stroke-width: 1.7; }
body:not([data-authoring=true]) #transport-collapse { grid-row: 2; }
body:not([data-authoring=true]) #transport-collapse svg,
body:not([data-authoring=true]) #transport-restore svg { width: 28px; height: 28px; }
body:not([data-authoring=true]) #chapter-nav {
  grid-area: 1 / 2;
  align-self: center;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}
body:not([data-authoring=true]) #chapter-nav > button { min-height: 44px; }
body:not([data-authoring=true]) #transport .transport-main {
  grid-area: 2 / 2;
  position: relative;
  min-width: 0;
  min-height: 44px;
}
body:not([data-authoring=true]) #transport .transport-main::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}
/* With titles shut, give both controls a real touch target on the SAME row.
   No empty chapter-height spacer. Restore returns to whichever state was set. */
body:not([data-authoring=true])[data-chapters-collapsed=true] #transport {
  grid-template-columns: 44px 44px minmax(0, 1fr);
  grid-template-rows: auto;
  gap: 0;
}
body:not([data-authoring=true])[data-chapters-collapsed=true] #transport-collapse { grid-area: 1 / 2; }
body:not([data-authoring=true])[data-chapters-collapsed=true] #transport .transport-main {
  grid-area: 1 / 3;
  margin-left: var(--dock-gap);
  min-height: 44px;
}
body:not([data-authoring=true])[data-chapters-collapsed=true] #transport::before {
  left: calc(var(--dock-pad) + 88px + var(--dock-gap) / 2);
}
body:not([data-authoring=true])[data-chapters-collapsed=true] #transport .transport-main::before { display: none; }
body:not([data-authoring=true]) #transport-restore { bottom: var(--collection-space, 0px); }
@media (max-width: 600px), (max-height: 560px) {
  body:not([data-authoring=true]) #transport {
    --dock-gap: 6px;
    width: calc(100% - 16px);
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--collection-space, 0px));
  }
  body:not([data-authoring=true]) #transport-restore { width: calc(100% - 16px); }
}
