/* The atelier on a phone: the rail at the bottom, the navigation as a drawer,
   everything that floats as a sheet. The text is continuous there already. */
@media (max-width: 800px) {
  body.workshop {
    flex-direction: column;
  }

  .workshop__rail {
    block-size: 56px;
    border-block-start: 1px solid var(--glass-border);
    border-inline-end: 0;
    flex-direction: row;
    gap: 2px;
    inline-size: 100%;
    justify-content: space-around;
    order: 3;
    padding: 0 8px;
  }

  .workshop__logo {
    block-size: 34px;
    border-radius: 12px;
    font-size: 18px;
    inline-size: 34px;
    margin: 0;
  }

  .workshop__rail-spacer {
    display: none;
  }

  .workshop__nav {
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    inline-size: min(86vw, 320px);
    inset: 0 auto 56px 0;
    position: fixed;
    z-index: 40;
  }

  .workshop__main {
    flex: 1;
    min-block-size: 0;
  }

  .workshop__context {
    padding-inline: 12px;
  }

  /* Only where we are, not the way there */
  .workshop__crumbs {
    a,
    .workshop__crumb-separator {
      display: none;
    }
  }

  .workshop__saved-state {
    display: none !important;
  }

  .workshop__toolbar {
    padding-inline: 12px;
  }

  .toolbar-pill {
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-inline-size: 100%;
    overflow-x: auto;
    scrollbar-width: none;

    :is(button, label) {
      flex-shrink: 0;
    }
  }

  .workshop__scroll {
    padding: 8px 16px 40px;
  }

  .workshop__status {
    gap: 8px;
    padding-inline: 12px;

    .workshop__segmented,
    .workshop__kbd {
      display: none;
    }
  }

  /* What floats comes up from the bottom, above the rail */
  .workshop__popover {
    inline-size: auto;
    inset: auto 8px 64px 8px;
    max-block-size: 72dvh;
  }

  body.workshop .ai-drawer {
    block-size: min(72dvh, 520px);
    inline-size: auto;
    inset: auto 8px 64px 8px;
  }

  body.workshop .ai-drawer__resizer {
    display: none;
  }

  .workshop__companion .companion {
    border-radius: 0;
    inline-size: 100%;
    inset: 0 0 56px 0;
    margin: 0;
    position: fixed;
    z-index: 35;
  }

  .palette {
    padding: 8vh 10px 0;
  }

  .atelier-title {
    font-size: 32px;
  }

  .plan__header,
  .bible__header,
  .library__header {
    gap: 8px;
    margin-block: 8px 18px;
  }

  .plan__leaves > turbo-frame {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .fiche-form {
    padding: 16px;
  }

  .fiche-form__detail {
    grid-template-columns: 1fr;
  }

  .settings .book__form {
    flex-direction: column;
  }
}
