:root { --pilotage-space: calc(70px + env(safe-area-inset-bottom, 0px)); }
body { padding-bottom: var(--pilotage-space); }
body.pilotage-retracted { --pilotage-space: calc(56px + env(safe-area-inset-bottom, 0px)); }
.canvas, .canvas[data-view="future"] {
  height: calc(100dvh - 236px - var(--pilotage-space));
  min-height: 340px;
}
#pilotage {
  position: fixed;
  inset: auto clamp(12px, 2.4vw, 42px) calc(8px + env(safe-area-inset-bottom, 0px)) calc(var(--rail) + clamp(12px, 2.4vw, 42px));
  z-index: 8;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.workspace:fullscreen, .workspace.immersive { padding-bottom: calc(var(--pilotage-space) + 10px); }
.workspace:fullscreen #pilotage, .workspace.immersive #pilotage { inset-inline: 12px; }
.workspace:fullscreen .workspace-foot, .workspace.immersive .workspace-foot { bottom: var(--pilotage-space); }
.pilotage-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 760px;
  width: 100%;
  min-width: 0;
  padding: 6px;
  color: #f5f7ff;
  background: linear-gradient(145deg,#172b43,#0a1424 65%);
  border: 1px solid #718caf80;
  border-radius: 17px;
  box-shadow: 0 10px 32px #0009,inset 0 1px 0 #b8d7ff24;
}
.pilotage-bar button {
  min-width: 38px;
  min-height: 42px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
#pilotage-toggle > span { color: #f1d1a5; }
#pilotage-toggle small { color: #b6c6db; font-size: 10px; }
#pilotage-open, #pilotage-form button { font-size: 19px; }
#pilotage-form { flex: 1; min-width: 0; display: flex; gap: 6px; }
#pilotage-form[hidden] { display: none; }
#pilotage-message {
  min-width: 0;
  flex: 1;
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  background: #091526;
  border: 1px solid #718caf80;
  color: #f5f7ff;
  border-radius: 12px;
}
#pilotage-message::placeholder { color: #aabbd2; }
#pilotage-message:focus-visible { outline: 2px solid #e8c89b; outline-offset: 1px; }
.pilotage-retracted .pilotage-bar { width: auto; margin-inline-start: auto; }
.pilotage-retracted .pilotage-bar button { min-height: 34px; }
@media (max-width:680px) {
  .canvas, .canvas[data-view="future"] { height: calc(100dvh - 237px - var(--pilotage-space)); min-height: 290px; }
  #pilotage { inset-inline: 7px; }
  .pilotage-bar { gap: 4px; padding: 5px; }
  #pilotage-toggle { flex-wrap: wrap; width: 72px; gap: 0 4px; padding-inline: 3px; font-size: 11px; }
  #pilotage-toggle small { width: 100%; }
  #pilotage-message { font-size: 16px; padding-inline: 7px; }
}
