.mobile-floor-dock { display: none; }

@media (max-width: 600px) {
  body.mobile-floor-layout .workspace { flex-direction: column; }
  body.mobile-floor-layout .viewport { flex: 1 1 0; height: auto; min-height: 0; }
  body.mobile-floor-layout .viewport-heading,
  body.mobile-floor-layout #leaders { display: none; }
  body.mobile-floor-layout .navigation-hint { display: none; }
  body.mobile-floor-layout .viewport-status { background: transparent; bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
  body.mobile-floor-layout .viewport-corner { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  body.mobile-floor-layout #drawer-toggle,
  body.mobile-floor-layout #inspector,
  body.mobile-floor-layout #drawer-backdrop { display: none; }

  body.mobile-floor-layout .mobile-floor-dock {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 0 0 calc(112px + env(safe-area-inset-bottom, 0px));
    height: calc(112px + env(safe-area-inset-bottom, 0px));
    min-height: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--ui-border, #d9e2d9);
    background: var(--ui-surface, #fbfcf9);
    z-index: 5;
  }

  .mobile-floor-info {
    display: grid;
    grid-template-columns: 40px minmax(0, 1.3fr) minmax(0, .75fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    height: 40px;
    min-height: 40px;
    font-variant-numeric: tabular-nums;
  }
  .mobile-floor-name { color: var(--ui-accent, #167c75); font-size: 12px; font-weight: 600; line-height: 1.2; }
  .mobile-floor-field { min-width: 0; }
  .mobile-floor-field > small { display: block; color: var(--ui-muted, #7a878b); font-size: 8px; line-height: 1.1; margin-bottom: 5px; white-space: nowrap; }
  .mobile-floor-field > strong { color: var(--ui-text, #182c35); font-size: 14px; font-weight: 550; line-height: 1; white-space: nowrap; }
  .mobile-floor-field strong > span { margin-left: 3px; color: var(--ui-muted, #7a878b); font-size: 8px; font-weight: 400; }
  html[lang="en"] .mobile-floor-field > small { font-size: 7px; letter-spacing: 0; }
  html[lang="en"] .mobile-floor-name { font-size: 11px; }

  /* Floors and view states share one continuous touch rail. */
  .mobile-floor-controls {
    display: flex;
    align-items: center;
    gap: 0;
    height: 40px;
    min-height: 40px;
    padding: 3px;
    border: 1px solid var(--ui-border, #d9e2d9);
    border-radius: 13px;
    background: var(--ui-soft, #e8eee9);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-floor-controls::-webkit-scrollbar { display: none; }
  .mobile-floor-tabs { flex: 1 0 180px; min-width: 180px; }
  .mobile-separation {
    flex: 0 0 116px;
    padding-left: 3px;
    margin-left: 3px;
    border-left: 1px solid var(--ui-border, #d9e2d9);
  }
  body.mobile-floor-layout #floor-labels {
    position: static;
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    height: 32px;
    padding: 0;
    overflow: visible;
    scrollbar-width: none;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
  }
  #mobile-floor-dock #floor-labels::-webkit-scrollbar { display: none; }
  #mobile-floor-dock #floor-labels .floor-label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 30px;
    width: auto;
    height: 32px;
    padding: 4px 2px;
    border: 0;
    border-radius: 9px;
    box-shadow: none;
    background: transparent;
    color: var(--ui-muted, #7a878b);
    transform: none !important;
    opacity: 1 !important;
    transition: background .22s ease, color .22s ease, box-shadow .22s ease;
  }
  #mobile-floor-dock #floor-labels .floor-label:hover { color: var(--ui-accent, #167c75); background: var(--ui-accent-soft, #e2eee4); }
  #mobile-floor-dock #floor-labels .floor-label.is-active,
  #mobile-floor-dock #floor-labels .floor-label.active,
  #mobile-floor-dock #floor-labels .floor-label[aria-pressed="true"] { background: var(--ui-selection, #ad8443); color: #fff; box-shadow: 0 2px 5px #182c3512; }
  #mobile-floor-dock #floor-labels .floor-label-title { display: flex; height: auto; padding: 0; gap: 0; background: none; color: inherit; }
  #mobile-floor-dock #floor-labels .floor-label-title strong { font-size: 10px; font-weight: 550; line-height: 1.2; }
  #mobile-floor-dock #floor-labels .floor-label-dot,
  #mobile-floor-dock #floor-labels .floor-label-level,
  #mobile-floor-dock #floor-labels .floor-label-summary { display: none; }
  #mobile-floor-dock .slice-control {
    position: static;
    width: 100%;
    height: 32px;
    padding: 0;
    gap: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
  }
  #mobile-floor-dock .separation-option { flex-direction: row; height: 32px; padding: 2px; gap: 2px; border: 0; border-radius: 9px; color: var(--ui-muted, #7a878b); }
  #mobile-floor-dock .separation-option:hover { color: var(--ui-accent, #167c75); background: var(--ui-accent-soft, #e2eee4); }
  #mobile-floor-dock .separation-option[aria-pressed="true"] { color: #1e786c; background: var(--ui-accent-soft, #e2eee4); }
  #mobile-floor-dock .floor-label:focus-visible,
  #mobile-floor-dock .separation-option:focus-visible { outline: 2px solid var(--ui-accent, #167c75); outline-offset: -2px; }
  #mobile-floor-dock .separation-option .icon { flex: 0 0 11px; width: 11px; height: 11px; }
  #mobile-floor-dock .separation-label { font-size: 8px; letter-spacing: 0; }
}
