@media (max-width: 768px) {
    html, body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
  }
  .app {
    overflow-x: hidden;
    width: 100%;
  }
    .sidebar {
    width: 100%;
    height: auto; 
    min-height: calc(70px + env(safe-area-inset-bottom));
    
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-start;
    
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.08);
    background: #ffffff;
    padding: 8px 0 env(safe-area-inset-bottom) 0;
    gap: 0;
    z-index: 1001;
  }

  .nav-item {
    height: 60px;
    border-radius: 0;
    gap: 2px;
    flex: 1;
    background: transparent;
  }

  .nav-item i { 
    font-size: 20px; 
    margin-bottom: 0;
  }

  .top-nav {
    gap: 2px;
    padding: 4px;
    width: 100%;
    justify-content: space-around;
  }
  .top-nav-item {
    flex: 1; 
    padding: 10px 4px; 
    justify-content: center;
    font-size: 11px;
    white-space: nowrap; 
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .nav-item span {
    font-size: 10px;
  }

  .nav-item.active { 
    background: transparent; 
    box-shadow: none; 
  }

  .nav-item.active::before { 
    left: 50%;
    top: auto; 
    bottom: 2px;    
    width: 35px;     
    height: 3px;      
    transform: translateX(-50%);
    border-radius: 4px 4px 0 0; 
    background: var(--blue);
  }

  .main-area { 
    margin-left: 0 !important; 
    padding: calc(20px + env(safe-area-inset-top)) 12px calc(120px + env(safe-area-inset-bottom)) !important; 
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    display: block !important; 
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-bottom: 20px;
  }
  body.editor-page {
    overflow-y: auto !important;
    height: auto !important;
    position: relative !important;
  }

  body.editor-page .app {
    display: block !important;
    height: auto !important;
  }

  body.editor-page .main-area {
    margin-left: 0 !important;
    height: auto !important;
    display: block !important;
    overflow: visible !important;
    padding-bottom: 180px !important; 
  }

  /* Footer a sidebar zůstanou fixní jen na této stránce v tomto rozložení */
  body.editor-page .footer-bar {
    position: fixed !important;
    bottom: calc(65px + env(safe-area-inset-bottom)) !important;
    z-index: 1900 !important;
    /* ... zbytek stylů co jsme psali ... */
  }
}