/* World-Class 3D Mobile UX (Shapr3D / IKEA Place / Autodesk Style) */
@media (max-width: 900px) {
  * { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
  html, body {
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    touch-action: none;
  }

  /* Верхняя компактная панель (Header) */
  header, .topbar, #top-bar {
    position: fixed !important;
    top: env(safe-area-inset-top, 8px) !important;
    left: 10px !important;
    right: 10px !important;
    height: 46px !important;
    background: rgba(15, 23, 42, 0.78) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    padding: 0 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    z-index: 1000 !important;
    overflow-x: auto !important;
  }

  /* Скрываем старые разрозненные нижние панели на мобильном, заменяя их единым Bottom Dock */
  #pro-toolbar, .bottom-controls, #camera-controls, .controls-bar, #explode-panel {
    display: none !important;
  }

  /* Единый современный Bottom Sheet Dock под большой палец */
  #world-mobile-dock {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 10px) + 8px);
    left: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 10px 12px;
    z-index: 1050;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
    color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  }

  .wmd-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 6px;
    margin-bottom: 10px;
  }
  .wmd-tab {
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(30, 41, 59, 0.8);
    color: #94a3b8;
    font-weight: 700;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }
  .wmd-tab.active {
    background: #f59e0b;
    color: #0f172a;
  }
  .wmd-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .wmd-row::-webkit-scrollbar { display: none; }
  .wmd-btn {
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(30, 41, 59, 0.9);
    color: #f8fafc;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .wmd-btn.ar {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    border: none;
    color: #fff;
  }
  .wmd-slider-box {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 40px;
    background: rgba(30, 41, 59, 0.7);
    padding: 0 12px;
    border-radius: 12px;
    margin-top: 8px;
    font-size: 12.5px;
    font-weight: 600;
  }
  .wmd-slider-box input[type="range"] {
    flex: 1;
    accent-color: #f59e0b;
    height: 6px;
  }
}